private static string GetErrorMessage(BRANCH_EXCEPTION_TYPE type) { switch (type) { case BRANCH_EXCEPTION_TYPE.BRANCH_NOT_OPEN: return("Tried to add a node to a closed branch."); default: return(string.Empty); } }
public BranchException(BRANCH_EXCEPTION_TYPE type) : base(GetErrorMessage(type)) { }