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

com.katalon.platform.api.exception.PlatformException Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package com.katalon.platform.api.exception;

public class PlatformException extends Exception {

    private static final long serialVersionUID = 1L;

    private final String detailMessage;

    private final Throwable rootCause;

    public PlatformException(String message) {
        this(message, null);
    }

    public PlatformException(Exception rootCause) {
        this("", rootCause);
    }

    public PlatformException(String message, Exception rootCause) {
        super(rootCause);
        this.detailMessage = message;
        this.rootCause = rootCause;
    }

    public String getDetailMessage() {
        return detailMessage;
    }

    public Throwable getCause() {
        return rootCause;
    }
    
    @Override
    public String toString() {
        return String.format("PlatformException { detailMessage : %s, rootCause %s }",
                detailMessage != null ? detailMessage : "null",
                rootCause != null ? rootCause.toString() : "null");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy