Skip to content
Snippets Groups Projects
Select Git revision
  • f3510ac020e3120312031472c255bdd515558e2e
  • master default protected
2 results

TreeCmpException.java

Blame
  • user avatar
    Birgitta Paeuker authored
    f3510ac0
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    TreeCmpException.java 935 B
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    
    package treecmp.common;
    
    /**
     *
     * @author Damian
     */
    public class TreeCmpException extends Exception {
    
      private String errMsg;
    //----------------------------------------------
    // Default constructor - initializes instance variable to unknown
      public TreeCmpException()
      {
        super();             // call superclass constructor
        errMsg = "unknown";
      }
    
    //-----------------------------------------------
    // Constructor receives some kind of message that is saved in an instance variable.
      public TreeCmpException(String errMsg)
      {
        super(errMsg);     // call super class constructor
        this.errMsg = errMsg;  // save message
      }
    
    //------------------------------------------------
    // public method, callable by exception catcher. It returns the error message.
      public String getError()
      {
        return errMsg;
      }
    }