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

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

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

@SuppressWarnings("serial")
public abstract class MessageInstanceException extends Exception implements MessageInstanceHolder {

    private final MessageInstance messageInstance;

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

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

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

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

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

    public MessageInstanceException(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