menu: added new Keywords tag to .desktop files
[barry.git] / doc / Exceptions
blobe136d3f644d70c75a97e5a5baca022406d512b16
2 The Barry library has the following exception hierarchy:
4 - std::exception
5         - std::logic_error
6         - std::runtime_error
7                 - Barry::Error
8                         - Usb::Error
9                                 - Usb::Timeout
10                         - Barry::BadPassword
11                         - Barry::SocketCloseOnOpen
12                         - Barry::BadData
13                         - Barry::BadSize
14                         - Barry::ConfigFileError
15                         - Barry::ErrnoError
16                                 - Barry::ConfigFileError
17                         - Barry::BadPackedFormat
18                         - Barry::BadPacket
19                         - Barry::ConvertError
20                         - Barry::BackupError
21                         - Barry::RestoreError
22                         - Barry::JDWP::Error
23                         - Barry::JDWP::Timeout
24                         - Barry::PinNotFound
25                         - Barry::ReturnCodeError
27 Usb::Error
28         All specific USB error exceptions will be derived from
29         this class.  Where possible, this class also stores the
30         specific return code from the libusb API, to allow
31         fine grained error handling.
33 Barry::Error
34         All specific Barry error exceptions will be derived from
35         this class.  This can be thrown from anywhere inside Barry.
37 std::bad_alloc
38         There is also the remote possibility that there will be memory
39         exceptions from a call to 'new'.  In that case, std::bad_alloc
40         will be thrown by the standard C++ libraries.  Barry does not
41         catch these errors.
43 std::logic_error
44         Assert-like errors will cause std::logic_error to be thrown.
45         Barry does sometimes throw these, but they should be be
46         exceedingly rare.
48 All of the above exceptions (from std, Barry, and Usb namespaces)
49 are derived from std::exception, so they can all be caught in one
50 statement for the efficient and lazy. :-)