api/src/main/java/io/knotx/fragments/api/FragmentOperationError.java
/**
   * Creates the new instance.
   *
   * @param error exception to serialize
   */
Creates the new instance.
@param error exception to serialize
Creates the new instance . @param error exception to serialize
public static FragmentOperationError newInstance(Throwable error) {
    final List<String> stackTraceLogs = Arrays.stream(error.getStackTrace())
        .map(StackTraceElement::toString)
        .collect(Collectors.toList());
    return new FragmentOperationError()
        .setClassName(error.getClass().getCanonicalName())
        .setMessage(error.getMessage())
        .setStacktrace(stackTraceLogs);
  }
public static FragmentOperationError newInstance ( Throwable error ) { final List < String > stackTraceLogs = Arrays . stream ( error . getStackTrace ( ) ) . map ( StackTraceElement :: toString ) . collect ( Collectors . toList ( ) ) ; return new FragmentOperationError ( ) . setClassName ( error . getClass ( ) . getCanonicalName ( ) ) . setMessage ( error . getMessage ( ) ) . setStacktrace ( stackTraceLogs ) ; }
Creates the new instance.
Creates the new instance .