Interface ThrowableSerializationStrategy

    • Method Detail

      • describeInContext

        java.util.List<ThrowableDescription> describeInContext​(java.lang.Throwable throwable,
                                                               java.util.List<Subsegment> subsegments)
        Serializes a Throwable into a ThrowableDescription. Uses the provided subsegments to chain exceptions where possible.
        Parameters:
        throwable - the Throwable to serialize
        subsegments - the list of subsegment children in which to look for the same Throwable object, for chaining
        Returns:
        a list of ThrowableDescriptions which represent the provided Throwable
      • describeInContext

        default java.util.List<ThrowableDescription> describeInContext​(@Nullable Entity entity,
                                                                       java.lang.Throwable throwable,
                                                                       java.util.List<Subsegment> subsegments)
        Serializes a Throwable into a ThrowableDescription. Uses the provided subsegments to chain exceptions where possible.
        Parameters:
        entity - the current entity. May be null.
        throwable - the Throwable to serialize
        subsegments - the list of subsegment children in which to look for the same Throwable object, for chaining
        Returns:
        a list of ThrowableDescriptions which represent the provided Throwable