<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package bali;

/**
 * Parent class for exceptions generated while compiling a Bali program.
 */
public abstract class BaliException extends Exception {
    
    private int line = -1;
    
    /* Constructors */
    public BaliException () {}
    public BaliException (String message) {super(message);}
    public BaliException (int line) {this.line = line;}
    public BaliException (String message, int line) {super(message); this.line = line;}
    
    /* Retrieving information */
    public int getLine () {return line;}
    public String getMessage () {return super.getMessage();}
    public String toString () {
        return (line &gt; -1) ? (getMessage() + ": line " + line) : getMessage();
    }
}
</pre></body></html>