forked from boostorg/exception
Examples/documentation update
[SVN r54842]
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
class file_read_error: public boost::exception { };
|
||||
struct file_read_error: virtual boost::exception { };
|
||||
|
||||
void
|
||||
file_read( FILE * f, void * buffer, size_t size )
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
typedef boost::error_info<struct tag_my_info,int> my_info; //(1)
|
||||
|
||||
class my_error: public boost::exception, public std::exception { }; //(2)
|
||||
struct my_error: virtual boost::exception, virtual std::exception { }; //(2)
|
||||
|
||||
void
|
||||
f()
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
//
|
||||
|
||||
class file_read_error: public boost::exception { };
|
||||
struct file_read_error: virtual boost::exception { };
|
||||
|
||||
void
|
||||
file_read( FILE * f, void * buffer, size_t size )
|
||||
|
@ -29,8 +29,8 @@ size_t const data_size = sizeof(data);
|
||||
|
||||
class
|
||||
error: //Base for all exception objects we throw.
|
||||
public std::exception,
|
||||
public boost::exception
|
||||
public virtual std::exception,
|
||||
public virtual boost::exception
|
||||
{
|
||||
public:
|
||||
|
||||
@ -47,14 +47,12 @@ error: //Base for all exception objects we throw.
|
||||
}
|
||||
};
|
||||
|
||||
class open_error: public error { };
|
||||
class read_error: public error { };
|
||||
class write_error: public error { };
|
||||
|
||||
class fopen_error: public open_error { };
|
||||
class fread_error: public read_error { };
|
||||
class fwrite_error: public write_error { };
|
||||
|
||||
struct open_error: virtual error { };
|
||||
struct read_error: virtual error { };
|
||||
struct write_error: virtual error { };
|
||||
struct fopen_error: virtual open_error { };
|
||||
struct fread_error: virtual read_error { };
|
||||
struct fwrite_error: virtual write_error { };
|
||||
|
||||
boost::shared_ptr<FILE>
|
||||
my_fopen( char const * name, char const * mode )
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
typedef boost::tuple<boost::errinfo_api_function,boost::errinfo_errno> clib_failure;
|
||||
|
||||
class file_open_error: public boost::exception { };
|
||||
struct file_open_error: virtual boost::exception { };
|
||||
|
||||
boost::shared_ptr<FILE>
|
||||
file_open( char const * name, char const * mode )
|
||||
|
Reference in New Issue
Block a user