Pip-Services-Commons-Dotnet
Public Member Functions | Protected Member Functions | List of all members
PipServices3.Commons.Errors.UnknownException Class Reference

Unknown or unexpected errors More...

Inheritance diagram for PipServices3.Commons.Errors.UnknownException:
PipServices3.Commons.Errors.ApplicationException

Public Member Functions

 UnknownException (string message)
 Creates an error instance with error message. More...
 
 UnknownException (Exception innerException)
 Creates an error instance and assigns its values. More...
 
 UnknownException (string correlationId=null, string code=null, string message=null, Exception innerException=null)
 Creates an error instance and assigns its values. More...
 
- Public Member Functions inherited from PipServices3.Commons.Errors.ApplicationException
 ApplicationException ()
 Creates a new instance of application exception. More...
 
 ApplicationException (string category=null, string correlationId=null, string code=null, string message=null)
 Creates a new instance of application exception and assigns its values. More...
 
override void GetObjectData (SerializationInfo info, StreamingContext context)
 
ApplicationException WithCode (string code)
 Sets a unique error code. More...
 
ApplicationException WithCorrelationId (string correlationId)
 Sets a correlation id which can be used to trace this error through a call chain. More...
 
ApplicationException WithCause (Exception cause)
 Sets a original error wrapped by this exception. More...
 
ApplicationException WithStatus (int status)
 Sets a HTTP status code which shall be returned by REST calls. More...
 
ApplicationException WithDetails (string key, object value)
 Sets a parameter for additional error details. This details can be used to restore error description in other languages. More...
 
ApplicationException WithStackTrace (string stackTrace)
 Sets a stack trace for this error. This method returns reference to this exception to implement Builder pattern to chain additional calls. More...
 
ApplicationException Wrap (Exception cause)
 Wraps another exception into specified application exception object. If original exception is of ApplicationException type it is returned without changes.Otherwise the original error is set as a cause to specified ApplicationException object. More...
 

Protected Member Functions

 UnknownException (SerializationInfo info, StreamingContext context)
 
- Protected Member Functions inherited from PipServices3.Commons.Errors.ApplicationException
 ApplicationException (string message)
 Creates a new instance of application exception with string message. More...
 
 ApplicationException (SerializationInfo info, StreamingContext context)
 

Additional Inherited Members

- Static Public Member Functions inherited from PipServices3.Commons.Errors.ApplicationException
static ApplicationException WrapException (ApplicationException error, Exception cause)
 Wraps another exception into specified application exception object. If original exception is of ApplicationException type it is returned without changes.Otherwise the original error is set as a cause to specified ApplicationException object. More...
 
- Public Attributes inherited from PipServices3.Commons.Errors.ApplicationException
string BaseMessage => Message
 
- Properties inherited from PipServices3.Commons.Errors.ApplicationException
string Category [get, set]
 
string CorrelationId [get, set]
 
string Cause [get, set]
 
string Code [get, set]
 
int Status [get, set]
 
StringValueMap Details [get, set]
 
new string StackTrace [get, set]
 

Detailed Description

Unknown or unexpected errors

Constructor & Destructor Documentation

◆ UnknownException() [1/3]

PipServices3.Commons.Errors.UnknownException.UnknownException ( string  message)

Creates an error instance with error message.

Parameters
message(optional) a human-readable description of the error.

◆ UnknownException() [2/3]

PipServices3.Commons.Errors.UnknownException.UnknownException ( Exception  innerException)

Creates an error instance and assigns its values.

Parameters
innerExceptionan error object

See ErrorCategory.Unknown

◆ UnknownException() [3/3]

PipServices3.Commons.Errors.UnknownException.UnknownException ( string  correlationId = null,
string  code = null,
string  message = null,
Exception  innerException = null 
)

Creates an error instance and assigns its values.

Parameters
correlationId(optional) a unique transaction id to trace execution through call chain.
code(optional) a unique error code. Default: "UNKNOWN"
message(optional) a human-readable description of the error.
innerExceptionan error object

The documentation for this class was generated from the following file: