class GephiFormatException extends RuntimeException {

    private Throwable cause;
    private String message;
    private boolean isImport = false;

    public GephiFormatException(Class source, Throwable cause) {
        super(cause);
        this.cause = cause;
        if (source.equals(GephiReader.class) || source.equals(LoadTask.class)) {
            isImport = true;
        }
    }

    public GephiFormatException(String message) {
        super(message);
        this.message = message;
    }

    @Override
    public String getMessage() {
        if (this.cause == null) {
            return message;
        }
        return getLocalizedMessage();
    }

    @Override
    public String getLocalizedMessage() {<FILL_FUNCTION_BODY>}
}

        if (this.cause == null) {
            return message;
        }

        Object[] params = new Object[4];
        params[0] = cause.getClass().getSimpleName();
        params[1] = cause.getLocalizedMessage();

        StackTraceElement[] stackTrace = cause.getStackTrace();
        if (stackTrace != null && stackTrace.length > 0) {
            params[2] = stackTrace[0].getClassName();
            params[3] = stackTrace[0].getLineNumber();
        } else {
            params[2] = "Unknown";
            params[3] = "Unknown";
        }

        if (isImport) {
            return String
                .format(NbBundle.getMessage(GephiFormatException.class, "gephiFormatException_import"), params);
        } else //Export
        {
            return String
                .format(NbBundle.getMessage(GephiFormatException.class, "gephiFormatException_export"), params);
        }

    
<methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.Throwable) ,public void <init>(java.lang.String, java.lang.Throwable) <variables>static final long serialVersionUID