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(@NotNull java.util.Map<java.lang.String,java.lang.Object> unknown) |
@Nullable Mechanism |
getMechanism()
Gets an optional mechanism that created this exception.
|
@Nullable java.lang.String |
getModule()
Gets the optional module, or package which the exception type lives in.
|
@Nullable SentryStackTrace |
getStacktrace()
Gets the stack trace.
|
@Nullable java.lang.Long |
getThreadId()
Gets an optional value which refers to a thread in the threads interface.
|
@Nullable java.lang.String |
getType()
The Exception Type.
|
@Nullable java.lang.String |
getValue()
The exception value.
|
void |
setMechanism(@Nullable Mechanism mechanism)
Sets an optional mechanism that created this exception.
|
void |
setModule(@Nullable java.lang.String module)
Sets the optional module, or package which the exception type lives in.
|
void |
setStacktrace(@Nullable SentryStackTrace stacktrace)
Sets the stack trace.
|
void |
setThreadId(@Nullable java.lang.Long threadId)
Sets an optional value which refers to a thread in the threads interface.
|
void |
setType(@Nullable java.lang.String type)
The Exception Type.
|
void |
setValue(@Nullable java.lang.String value)
The exception value
|
@Nullable public @Nullable java.lang.String getType()
public void setType(@Nullable
@Nullable java.lang.String type)
type - type of the exception.@Nullable public @Nullable java.lang.String getValue()
public void setValue(@Nullable
@Nullable java.lang.String value)
value - The exception message@Nullable public @Nullable java.lang.String getModule()
public void setModule(@Nullable
@Nullable java.lang.String module)
module - the module.@Nullable public @Nullable java.lang.Long getThreadId()
public void setThreadId(@Nullable
@Nullable java.lang.Long threadId)
threadId - the thread id.@Nullable public @Nullable SentryStackTrace getStacktrace()
public void setStacktrace(@Nullable
@Nullable SentryStackTrace stacktrace)
stacktrace - the stacktrace of the exception.@Nullable public @Nullable Mechanism getMechanism()
public void setMechanism(@Nullable
@Nullable Mechanism mechanism)
mechanism - the mechanism.@ApiStatus.Internal
public void acceptUnknownProperties(@NotNull
@NotNull java.util.Map<java.lang.String,java.lang.Object> unknown)
acceptUnknownProperties in interface IUnknownPropertiesConsumer