src/work/klao/error_test.cc
changeset 1208 f486d30e4e7b
parent 1120 5d8d64bde9c5
equal deleted inserted replaced
1:f167373a26fd 2:4aca0a7c067d
     1 #include <iostream>
     1 #include <iostream>
     2 #include <string>
     2 #include <string>
     3 
     3 
     4 #define LEMON_ASSERT_ABORT 0
     4 #define LEMON_ASSERT_ABORT 0
     5 #include <error.h>
     5 #include <lemon/error.h>
     6 
     6 
     7 using namespace std;
     7 using namespace std;
     8 
     8 
     9 void parse_line() {
     9 void parse_line() {
    10   throw lemon::DataFormatError("Syntax error");
    10   throw lemon::DataFormatError("Syntax error");
    67 }
    67 }
    68 
    68 
    69 #undef LEMON_ASSERT_HANDLER
    69 #undef LEMON_ASSERT_HANDLER
    70 #define LEMON_ASSERT_EXCEPTION
    70 #define LEMON_ASSERT_EXCEPTION
    71 
    71 
    72 #include <error.h>
    72 #include <lemon/error.h>
    73 
    73 
    74 void fail_assert() {
    74 void fail_assert() {
    75   LEMON_ASSERT(2*2==5, "Marson vagyunk");
    75   LEMON_ASSERT(2*2==5, "Marson vagyunk");
    76 }
    76 }
    77 
       
    78