public final class SentryException extends java.lang.Object implements IUnknownPropertiesConsumer
Multiple values inside of an [event](#typedef-Event) represent chained exceptions and should be sorted oldest to newest. For example, consider this Python code snippet:
```python try: raise Exception("random boring invariant was not met!") except Exception as e: raise ValueError("something went wrong, help!") from e ```
`Exception` would be described first in the values list, followed by a description of `ValueError`:
```json { "exception": { "values": [ {"type": "Exception": "value": "random boring invariant was not met!"}, {"type": "ValueError", "value": "something went wrong, help!"}, ] } } ```
Constructor and Description |
---|
SentryException() |
Modifier and Type | Method and Description |
---|---|
void |
acceptUnknownProperties(java.util.Map<java.lang.String,java.lang.Object> unknown) |
Mechanism |
getMechanism()
Gets an optional mechanism that created this exception.
|
java.lang.String |
getModule()
Gets the optional module, or package which the exception type lives in.
|
SentryStackTrace |
getStacktrace()
Gets the stack trace.
|
java.lang.Long |
getThreadId()
Gets an optional value which refers to a thread in the threads interface.
|
java.lang.String |
getType()
The Exception Type.
|
java.lang.String |
getValue()
The exception value.
|
void |
setMechanism(Mechanism mechanism)
Sets an optional mechanism that created this exception.
|
void |
setModule(java.lang.String module)
Sets the optional module, or package which the exception type lives in.
|
void |
setStacktrace(SentryStackTrace stacktrace)
Sets the stack trace.
|
void |
setThreadId(java.lang.Long threadId)
Sets an optional value which refers to a thread in the threads interface.
|
void |
setType(java.lang.String type)
The Exception Type.
|
void |
setValue(java.lang.String value)
The exception value
|
public java.lang.String getType()
public void setType(java.lang.String type)
type
- type of the exception.public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- The exception messagepublic java.lang.String getModule()
public void setModule(java.lang.String module)
module
- the module.public java.lang.Long getThreadId()
public void setThreadId(java.lang.Long threadId)
threadId
- the thread id.public SentryStackTrace getStacktrace()
public void setStacktrace(SentryStackTrace stacktrace)
stacktrace
- the stacktrace of the exception.public Mechanism getMechanism()
public void setMechanism(Mechanism mechanism)
mechanism
- the mechanism.@ApiStatus.Internal public void acceptUnknownProperties(java.util.Map<java.lang.String,java.lang.Object> unknown)
acceptUnknownProperties
in interface IUnknownPropertiesConsumer