/** * 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(); }
"incoming script size was <" + incomingScriptSize + "> bytes, " + "outgoing script size was <" + outgoingScriptSize + "> bytes") .build(); throw MessageMapperConfigurationFailedException.newBuilder(e.getMessage() + " - in line/column #" + e.lineNumber() + "/" + e.columnNumber() + lineSource + scriptStackTrace) .cause(e) .build();
private Builder(final String errorMessage) { this(); message(MessageFormat.format(MESSAGE_TEMPLATE, errorMessage)); }
"incoming script size was <" + incomingScriptSize + "> bytes, " + "outgoing script size was <" + outgoingScriptSize + "> bytes") .build(); throw MessageMapperConfigurationFailedException.newBuilder(e.getMessage() + " - in line/column #" + e.lineNumber() + "/" + e.columnNumber() + lineSource + scriptStackTrace) .cause(e) .build();
/** * 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(); }
/** * Constructs a new {@code MessageMapperConfigurationFailedException} object with given message. * * @param message detail message. This message can be later retrieved by the {@link #getMessage()} method. * @param dittoHeaders the headers of the command which resulted in this exception. * @return the new MessageMapperConfigurationFailedException. */ public static MessageMapperConfigurationFailedException fromMessage(final String message, final DittoHeaders dittoHeaders) { return new Builder() .dittoHeaders(dittoHeaders) .message(message) .build(); }
private Builder(final String errorMessage) { this(); message(MessageFormat.format(MESSAGE_TEMPLATE, errorMessage)); }
private Builder() { description(DEFAULT_DESCRIPTION); }
/** * Constructs a new {@code MessageMapperConfigurationFailedException} object with given message. * * @param message detail message. This message can be later retrieved by the {@link #getMessage()} method. * @param dittoHeaders the headers of the command which resulted in this exception. * @return the new MessageMapperConfigurationFailedException. */ public static MessageMapperConfigurationFailedException fromMessage(final String message, final DittoHeaders dittoHeaders) { return new Builder() .dittoHeaders(dittoHeaders) .message(message) .build(); }
private Builder() { description(DEFAULT_DESCRIPTION); }
/** * A mutable builder for a {@code MessageMapperConfigurationFailedException}. * * @param errorMessage the errorMessage describing why the mapper configuration failed. * @return the builder. */ public static Builder newBuilder(final String errorMessage) { return new Builder(errorMessage); }
/** * A mutable builder for a {@code MessageMapperConfigurationFailedException}. * * @param errorMessage the errorMessage describing why the mapper configuration failed. * @return the builder. */ public static Builder newBuilder(final String errorMessage) { return new Builder(errorMessage); }