manpagez: man pages & more
info cln
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.1 Error handling

CLN signals abnormal situations by throwning exceptions. All exceptions thrown by the library are of type runtime_exception or of a derived type. Class cln::runtime_exception in turn is derived from the C++ standard library class std::runtime_error and inherits the .what() member function that can be used to query details about the cause of error.

The most important classes thrown by the library are

                  Exception base class
                    runtime_exception
                    <cln/exception.h>
                            | 
           +----------------+----------------+
           |                                 |
 Malformed number input             Floating-point error
 read_number_exception            floating_poing_exception
   <cln/number_io.h>                   <cln/float.h>

CLN has many more exception classes that allow for more fine-grained control but I refrain from documenting them all here. They are all declared in the public header files and they are all subclasses of the above exceptions, so catching those you are always on the safe side.


This document was generated on August 27, 2013 using texi2html 5.0.

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.