Class SKException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.microsoft.semantickernel.exceptions.SKException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AIException,TemplateException
public class SKException extends RuntimeException
Provides the base exception from which all Semantic Kernel exceptions derive.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SKException(String message)Initializes a new instance of theSKExceptionclass with its message set tomessage.SKException(String message, Throwable cause)Initializes a new instance of theSKExceptionclass with its message set tomessage.SKException(Throwable e)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SKExceptionbuild(String message, Exception e)Forms an unchecked exception, if the exception is already an SK exception, it will be unwrapped and the cause extracted.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
SKException
public SKException(@Nullable String message)
Initializes a new instance of theSKExceptionclass with its message set tomessage.- Parameters:
message- A string that describes the error.
-
SKException
public SKException(@Nullable String message, @Nullable Throwable cause)
Initializes a new instance of theSKExceptionclass with its message set tomessage.- Parameters:
message- A string that describes the error.cause- The exception that is the cause of the current exception.
-
SKException
public SKException(Throwable e)
-
-
Method Detail
-
build
public static SKException build(String message, @Nullable Exception e)
Forms an unchecked exception, if the exception is already an SK exception, it will be unwrapped and the cause extracted.- Parameters:
message- The message to be displayede- The exception to be thrown- Returns:
- An unchecked exception
-
-