~brianaker/gearmand/warning-usage

« back to all changes in this revision

Viewing changes to libtest/fatal.hpp

  • Committer: Brian Aker
  • Date: 2012-05-04 03:46:04 UTC
  • Revision ID: brian@tangent.org-20120504034604-5t22ae4v2o45zjkq
Update for libtest, documentation, and fix for root bzr dir.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
    return _error_message;
57
57
  }
58
58
 
 
59
  const char* mesg() const throw()
 
60
  {
 
61
    return _error_message;
 
62
  }
 
63
 
59
64
  // The following are just for unittesting the exception class
60
65
  static bool is_disabled();
61
66
  static void disable();
63
68
  static uint32_t disabled_counter();
64
69
  static void increment_disabled_counter();
65
70
 
 
71
  int line()
 
72
  {
 
73
    return _line;
 
74
  }
 
75
 
 
76
  const char*  file()
 
77
  {
 
78
    return _file;
 
79
  }
 
80
 
 
81
  const char* func()
 
82
  {
 
83
    return _func;
 
84
  }
 
85
 
66
86
private:
67
87
  char _error_message[BUFSIZ];
 
88
  char _mesg[BUFSIZ];
 
89
  int _line;
 
90
  const char*  _file;
 
91
  const char* _func;
68
92
};
69
93
 
70
94
class disconnected : std::runtime_error