cprover
typecheck.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
9 
10 #include "typecheck.h"
11 
13 {
14  assert(message_handler);
15 
16  const unsigned errors_before=
18 
19  try
20  {
21  typecheck();
22  }
23 
24  catch(int)
25  {
26  error();
27  }
28 
29  catch(const char *e)
30  {
31  error() << e << eom;
32  }
33 
34  catch(const std::string &e)
35  {
36  error() << e << eom;
37  }
38 
39  return message_handler->get_message_count(messaget::M_ERROR)!=errors_before;
40 }
static mstreamt & eom(mstreamt &m)
Definition: message.h:193
virtual void typecheck()=0
mstreamt & error()
Definition: message.h:223
message_handlert * message_handler
Definition: message.h:259
virtual bool typecheck_main()
Definition: typecheck.cpp:12
unsigned get_message_count(unsigned level) const
Definition: message.h:47