When an error situation happens inside OTP this exception can be used to terminate OTP or the current request http server). The message should contain enough information to the user to fix the problem. Before OTP terminates the message will be logged WITHOUT any stacktrace.
Typical use cases for this exception is:
Do not use this exception to terminate OTP in case of an unknown/unexpected event, then the IllegalArgumentException, IllegalStateException or RuntimeException should be used. These will be logged with a stacktrace.
name | data type | description |
---|---|---|
Properties inherited from Throwable |
||
message | string | |
cause | Throwable | |
localizedMessage | string | |
stackTrace | array of StackTraceElement | |
suppressed | array of Throwable |
Example
{ "message" : "...", "cause" : { "message" : "...", "cause" : { }, "localizedMessage" : "...", "stackTrace" : [ { "classLoaderName" : "...", "fileName" : "...", "nativeMethod" : true, "moduleName" : "...", "lineNumber" : 12345, "className" : "...", "moduleVersion" : "...", "methodName" : "..." }, { "classLoaderName" : "...", "fileName" : "...", "nativeMethod" : true, "moduleName" : "...", "lineNumber" : 12345, "className" : "...", "moduleVersion" : "...", "methodName" : "..." } ], "suppressed" : [ { }, { } ] }, "localizedMessage" : "...", "stackTrace" : [ { "classLoaderName" : "...", "fileName" : "...", "nativeMethod" : true, "moduleName" : "...", "lineNumber" : 12345, "className" : "...", "moduleVersion" : "...", "methodName" : "..." }, { "classLoaderName" : "...", "fileName" : "...", "nativeMethod" : true, "moduleName" : "...", "lineNumber" : 12345, "className" : "...", "moduleVersion" : "...", "methodName" : "..." } ], "suppressed" : [ { "message" : "...", "cause" : { }, "localizedMessage" : "...", "stackTrace" : [ { "classLoaderName" : "...", "fileName" : "...", "nativeMethod" : true, "moduleName" : "...", "lineNumber" : 12345, "className" : "...", "moduleVersion" : "...", "methodName" : "..." }, { "classLoaderName" : "...", "fileName" : "...", "nativeMethod" : true, "moduleName" : "...", "lineNumber" : 12345, "className" : "...", "moduleVersion" : "...", "methodName" : "..." } ], "suppressed" : [ { }, { } ] }, { "message" : "...", "cause" : { }, "localizedMessage" : "...", "stackTrace" : [ { "classLoaderName" : "...", "fileName" : "...", "nativeMethod" : true, "moduleName" : "...", "lineNumber" : 12345, "className" : "...", "moduleVersion" : "...", "methodName" : "..." }, { "classLoaderName" : "...", "fileName" : "...", "nativeMethod" : true, "moduleName" : "...", "lineNumber" : 12345, "className" : "...", "moduleVersion" : "...", "methodName" : "..." } ], "suppressed" : [ { }, { } ] } ] }