Class ContextServiceException
- Namespace
 - FoundationaLLM.Context.Exceptions
 
- Assembly
 - FoundationaLLM.ContextEngine.dll
 
Represents an exception that occurs when a service error occurs in the Context API.
public class ContextServiceException : HttpStatusCodeException, ISerializable
  - Inheritance
 - 
      
      
      
      ContextServiceException
 
- Implements
 
- Inherited Members
 
- Extension Methods
 
Constructors
ContextServiceException()
Initializes a new instance of the ContextServiceException class with a default message.
public ContextServiceException()
  ContextServiceException(string?, Exception?, int)
Initializes a new instance of the ContextServiceException class with its message set to message.
public ContextServiceException(string? message, Exception? innerException, int statusCode = 500)
  Parameters
messagestringA string that describes the error.
innerExceptionExceptionThe exception that is the cause of the current exception.
statusCodeintThe HTTP status code associated with the exception.
ContextServiceException(string?, int)
Initializes a new instance of the ContextServiceException class with its message set to message.
public ContextServiceException(string? message, int statusCode = 500)
  Parameters
messagestringA string that describes the error.
statusCodeintThe HTTP status code associated with the exception.
Methods
ThrowIfNullOrWhiteSpace(string?, string?)
Throws an exception if argument is null, empty, or consists only of white-space characters.
public static void ThrowIfNullOrWhiteSpace(string? argument, string? paramName = null)
  Parameters
argumentstringThe string argument to validate.
paramNamestringThe name of the parameter with which
argumentcorresponds.
Exceptions
- ContextServiceException
 argumentis empty or consists only of white-space characters.