MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
testexcept.cc File Reference
#include <iostream>
#include <sstream>
#include <cstdlib>
#include "except.h"
Include dependency graph for testexcept.cc:

Go to the source code of this file.

Classes

class  ErrPlain
 
class  ErrCode
 

Functions

int main (int argc, const char *argv[])
 

Function Documentation

int main ( int  argc,
const char *  argv[] 
)

Definition at line 62 of file testexcept.cc.

References MBDYN_EXCEPT_ARGS.

63 {
64  std::cout << "usage: testexcept [reason [code]]"
65  << std::endl << std::endl;
66  switch (argc) {
67  case 1:
69  break;
70 
71  case 2:
72  throw ErrPlain(MBDYN_EXCEPT_ARGS, argv[1]);
73  break;
74 
75  default:
76  throw ErrCode(MBDYN_EXCEPT_ARGS, argv[1], std::atoi(argv[2]));
77  break;
78  }
79 
80  return 0;
81 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63