34 }
catch ( std::exception& e ) {
35 assert(
string(e.what()).find(
"antani") != string::npos);
41 assert(e.fullInfo().find(
"antani") != string::npos);
50 throw wex::System(
"checking for existance of nonexisting file");
58 throw wex::File(
"does-not-exist",
"checking for existance of nonexisting file");
76 "bad cast: from i to PKc. Context:\n test" );
std::string formatContext() const
Definition: exception.h:154
Base class for exceptions for file I/O.
Definition: exception.h:421
Base class for all exceptions.
Definition: exception.h:180
virtual const std::string & fullInfo() const
Format in a string all available information about the exception.
Definition: exception.h:205
Base class for system exceptions.
Definition: exception.h:397
virtual int code() const
Get the system error code associated to the exception.
Definition: exception.h:408
bool access(const std::string &s, int m)
access() a filename
Definition: exception.test.h:29
Test system()
Definition: exception.test.h:45
Test addContext()
Definition: exception.test.h:82
Test badCast()
Definition: exception.test.h:67
Definition: exception.h:106
Definition: exception.h:288
Definition: exception.h:274
void Test
Definition: test.h:178
#define assert_eq(x, y)
Definition: test.h:33
#define assert(x)
Definition: test.h:30