- added examples/addcalendar.cc
[barry.git] / doc / Exceptions
blob9e3a21320a6892e3fb7eab41d96d25088aa347e2
2 The Barry library has the following exception hierarchy:
4 - std::exception
5         - std::runtime_error
6                 - Barry::Error
7                         - Usb::Error
8                                 - Usb::Timeout
9                         - Barry::BadPassword
11 Usb::Error
12         All specific USB error exceptions will be derived from
13         this class.  Where possible, this class also stores the
14         specific return code from the libusb API, to allow
15         fine grained error handling.
17 Barry::Error
18         All specific Barry error exceptions will be derived from
19         this class.  This can be thrown from anywhere inside Barry.
22 There is also the remote possibility that there will be memory exceptions
23 from a call to 'new'.  In that case, std::bad_alloc will be thrown
24 by the standard C++ libraries.  Barry does not catch these errors.
26 All of the above exceptions are derived from std::exception, so they
27 can all be caught in one statement for the efficient and lazy. :-)