Class OllamaToolErrorException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
me.neurodock.ollama.exceptions.OllamaToolErrorException
All Implemented Interfaces:
Serializable

public class OllamaToolErrorException extends RuntimeException
Represents an error from a tool.
This is used internally by tools instead of Exception, to then be handled gracefully by Core.handleResponce(JSONObject)
See Also:
  • Constructor Details

    • OllamaToolErrorException

      public OllamaToolErrorException(String tool, String error)
      Creates a new instance of OllamaToolErrorException.
      Parameters:
      tool - The tool that caused the error
      error - The error from the tool
    • OllamaToolErrorException

      public OllamaToolErrorException(String tool, Exception ex)
  • Method Details

    • getTool

      public String getTool()
      Gets the tool that caused the error.
      Returns:
      The tool that caused the error
    • getError

      public String getError()
      Gets the error from the tool.
      Returns:
      The error from the tool