@Override protected MessageMapperConfigurationFailedException doBuild(final DittoHeaders dittoHeaders, @Nullable final String message, @Nullable final String description, @Nullable final Throwable cause, @Nullable final URI href) { return new MessageMapperConfigurationFailedException(dittoHeaders, message, description, cause, href); } }
/** * Constructs a new {@code MessageMapperConfigurationFailedException} object with the exception message extracted from the given * JSON object. * * @param jsonObject the JSON to read the {@link JsonFields#MESSAGE} field from. * @param dittoHeaders the headers of the command which resulted in this exception. * @return the new MessageMapperConfigurationFailedException. * @throws org.eclipse.ditto.json.JsonMissingFieldException if the {@code jsonObject} does not have the {@link * JsonFields#MESSAGE} field. */ public static MessageMapperConfigurationFailedException fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders) { return new Builder() .dittoHeaders(dittoHeaders) .message(readMessage(jsonObject)) .description(readDescription(jsonObject).orElse(DEFAULT_DESCRIPTION)) .href(readHRef(jsonObject).orElse(null)) .build(); }
.newBuilder("The script size was bigger than the allowed <" + maxScriptSizeBytes + "> bytes: " + "incoming script size was <" + incomingScriptSize + "> bytes, " + "outgoing script size was <" + outgoingScriptSize + "> bytes") final boolean stackExists = e.getScriptStackTrace() != null && !e.getScriptStackTrace().isEmpty(); final String scriptStackTrace = stackExists ? (", stack:\n" + e.getScriptStackTrace()) : ""; throw MessageMapperConfigurationFailedException.newBuilder(e.getMessage() + " - in line/column #" + e.lineNumber() + "/" + e.columnNumber() + lineSource + scriptStackTrace) .cause(e)
/** * Constructs a new {@code MessageMapperConfigurationFailedException} object with the exception message extracted from the given * JSON object. * * @param jsonObject the JSON to read the {@link JsonFields#MESSAGE} field from. * @param dittoHeaders the headers of the command which resulted in this exception. * @return the new MessageMapperConfigurationFailedException. * @throws org.eclipse.ditto.json.JsonMissingFieldException if the {@code jsonObject} does not have the {@link * JsonFields#MESSAGE} field. */ public static MessageMapperConfigurationFailedException fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders) { return new Builder() .dittoHeaders(dittoHeaders) .message(readMessage(jsonObject)) .description(readDescription(jsonObject).orElse(DEFAULT_DESCRIPTION)) .href(readHRef(jsonObject).orElse(null)) .build(); }
.newBuilder("The script size was bigger than the allowed <" + maxScriptSizeBytes + "> bytes: " + "incoming script size was <" + incomingScriptSize + "> bytes, " + "outgoing script size was <" + outgoingScriptSize + "> bytes") final boolean stackExists = e.getScriptStackTrace() != null && !e.getScriptStackTrace().isEmpty(); final String scriptStackTrace = stackExists ? (", stack:\n" + e.getScriptStackTrace()) : ""; throw MessageMapperConfigurationFailedException.newBuilder(e.getMessage() + " - in line/column #" + e.lineNumber() + "/" + e.columnNumber() + lineSource + scriptStackTrace) .cause(e)
@Override protected MessageMapperConfigurationFailedException doBuild(final DittoHeaders dittoHeaders, @Nullable final String message, @Nullable final String description, @Nullable final Throwable cause, @Nullable final URI href) { return new MessageMapperConfigurationFailedException(dittoHeaders, message, description, cause, href); } }