Class Mechanism

java.lang.Object
io.sentry.protocol.Mechanism
All Implemented Interfaces:
JsonSerializable, JsonUnknown

public final class Mechanism extends Object implements JsonUnknown, JsonSerializable
The mechanism by which an exception was generated and handled.

The exception mechanism is an optional field residing in the [exception](#typedef-Exception). It carries additional information about the way the exception was created on the target system. This includes general exception values obtained from the operating system or runtime APIs, as well as mechanism-specific values.

  • Constructor Details

    • Mechanism

      public Mechanism()
    • Mechanism

      public Mechanism(@Nullable @Nullable Thread thread)
  • Method Details

    • getType

      @Nullable public @Nullable String getType()
    • setType

      public void setType(@Nullable @Nullable String type)
    • getDescription

      @Nullable public @Nullable String getDescription()
    • setDescription

      public void setDescription(@Nullable @Nullable String description)
    • getHelpLink

      @Nullable public @Nullable String getHelpLink()
    • setHelpLink

      public void setHelpLink(@Nullable @Nullable String helpLink)
    • isHandled

      @Nullable public @Nullable Boolean isHandled()
    • setHandled

      public void setHandled(@Nullable @Nullable Boolean handled)
    • getMeta

      @Nullable public @Nullable Map<String,Object> getMeta()
    • setMeta

      public void setMeta(@Nullable @Nullable Map<String,Object> meta)
    • getData

      @Nullable public @Nullable Map<String,Object> getData()
    • setData

      public void setData(@Nullable @Nullable Map<String,Object> data)
    • getSynthetic

      @Nullable public @Nullable Boolean getSynthetic()
    • setSynthetic

      public void setSynthetic(@Nullable @Nullable Boolean synthetic)
    • getUnknown

      @Nullable public @Nullable Map<String,Object> getUnknown()
      Specified by:
      getUnknown in interface JsonUnknown
    • setUnknown

      public void setUnknown(@Nullable @Nullable Map<String,Object> unknown)
      Specified by:
      setUnknown in interface JsonUnknown
    • serialize

      public void serialize(@NotNull @NotNull ObjectWriter writer, @NotNull @NotNull ILogger logger) throws IOException
      Specified by:
      serialize in interface JsonSerializable
      Throws:
      IOException