Go to the documentation of this file.00001
00008
00009
00010
00011
00012 #include <iostream>
00013 #include "../../include/ecl/errors/compile_time_assert.hpp"
00014 #include "../../include/ecl/errors/handlers.hpp"
00015 #include "../../include/ecl/errors/run_time_functions.hpp"
00016 #include "../../include/ecl/errors/macros.hpp"
00017
00018
00019
00020
00021
00025 template <int M, int N>
00026 class Test {
00027 public:
00028 Test() {
00029 ecl_compile_time_assert( M >= 0 );
00030 ecl_compile_time_assert( N >= 0 );
00031 }
00032 };
00036
00037
00038
00039
00040 int main() {
00041
00042 std::cout << std::endl;
00043 std::cout << "***********************************************************" << std::endl;
00044 std::cout << " Error functions" << std::endl;
00045 std::cout << "***********************************************************" << std::endl;
00046 std::cout << std::endl;
00047
00048 ecl::Error error(ecl::UnknownError);
00049 std::cout << "Error::what() " << std::endl;
00050 std::cout << error.what() << std::endl;
00051 std::cout << "Error::print() " << std::endl;
00052 error.print(LOC);
00053
00054 std::cout << std::endl;
00055 std::cout << "***********************************************************" << std::endl;
00056 std::cout << " Asserts and Aborts" << std::endl;
00057 std::cout << "***********************************************************" << std::endl;
00058 std::cout << std::endl;
00059
00060 ecl::Error configuration_error(ecl::ConfigurationError);
00061 Test<3,1> test;
00062
00063
00064
00065
00066 ecl_run_time_assert ( 2 < 1, LOC, configuration_error.flag() );
00067
00068
00069
00070 return 0;
00071 }
00072