All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.it.commons.logging.MessageInstanceRuntimeException Maven / Gradle / Ivy

The newest version!
package com.sap.it.commons.logging;

@SuppressWarnings("serial")
public abstract class MessageInstanceRuntimeException extends RuntimeException implements MessageInstanceHolder {

    private final MessageInstance messageInstance;

    public MessageInstanceRuntimeException(Throwable t) {
        super(t);
        this.messageInstance = null;
    }

    public MessageInstanceRuntimeException(String message) {
        super(message);
        this.messageInstance = null;
    }

    public MessageInstanceRuntimeException(String message, Throwable t) {
        super(message, t);
        this.messageInstance = null;
    }

    public MessageInstanceRuntimeException(MessageInstance messageInstance) {
        super(messageInstance != null ? MessageTools.assembleMessage(messageInstance) : null);
        this.messageInstance = messageInstance;
    }

    public MessageInstanceRuntimeException(MessageInstance messageInstance, Throwable cause) {
        super(messageInstance != null ? MessageTools.assembleMessage(messageInstance) : null, cause);
        this.messageInstance = messageInstance;
    }

    public MessageInstanceRuntimeException(Message message, Throwable cause) {
        this(message != null ? MessageTools.createMessageInstance(message) : null, cause);
    }

    public final MessageInstance getMessageInstance() {
        return messageInstance;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy