package com.github.jcgay.snp4j;

import com.github.jcgay.snp4j.impl.response.Error;
import com.github.jcgay.snp4j.impl.response.Status;
import lombok.Getter;

public class SnpException extends RuntimeException {

    @Getter
    private Status status;

    public SnpException(String s, Throwable throwable) {
        super(s, throwable);
    }

    public SnpException(Error error) {
        super(error.getHint());
        this.status = error.getStatus();
    }

    @Override
    public String toString() {
        return new StringBuilder()
                .append(super.toString())
                .append("Status: ")
                .append(status)
                .toString();
    }
}

@@ -605,16 +605,47 @@
 append(%22
+%5Cn%22)%0A                .append(%22 
 Status: 
@@ -677,16 +677,42 @@
 d(status
+ != null ? status : %22NONE%22
 )%0A      

Set a default status in #toString.