2007/07/26
[barry.git] / doc / Exceptions
blob3c18efc50ed181da80bca3a87cfc7c48f69bd4d4
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.  This is currently the only class used, and
14         only thrown in the usbwrap.{h,cc} code.
16 Barry::Error
17         All specific Barry error exceptions will be derived from
18         this class.  This can be thrown from anywhere inside Barry.
21 There is also the remote possibility that there will be memory exceptions
22 from a call to 'new'.  In that case, std::bad_alloc will be thrown
23 by the standard C++ libraries.  Barry does not catch these errors.
25 All of the above exceptions are derived from std::exception, so they
26 can all be caught in one statement for the efficient and lazy. :-)