Sync with 5.3.0
[deliverable/titan.core.git] / core / Error.hh
1 ///////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2000-2014 Ericsson Telecom AB
3 // All rights reserved. This program and the accompanying materials
4 // are made available under the terms of the Eclipse Public License v1.0
5 // which accompanies this distribution, and is available at
6 // http://www.eclipse.org/legal/epl-v10.html
7 ///////////////////////////////////////////////////////////////////////////////
8 #ifndef ERROR_HH
9 #define ERROR_HH
10
11 class TC_End { };
12
13 class TC_Error { };
14
15 class TTCN_Error : public TC_Error {
16 char* error_msg;
17 public:
18 TTCN_Error(char* p_error_msg): error_msg(p_error_msg) {}
19 char* get_message() const { return error_msg; }
20 ~TTCN_Error();
21 };
22
23 extern void TTCN_error(const char *err_msg, ...)
24 __attribute__ ((__format__ (__printf__, 1, 2), __noreturn__));
25 extern void TTCN_error_begin(const char *err_msg, ...)
26 __attribute__ ((__format__ (__printf__, 1, 2)));
27 extern void TTCN_error_end()
28 __attribute__ ((__noreturn__));
29
30 void TTCN_warning(const char *warning_msg, ...)
31 __attribute__ ((__format__ (__printf__, 1, 2)));
32 extern void TTCN_warning_begin(const char *warning_msg, ...)
33 __attribute__ ((__format__ (__printf__, 1, 2)));
34 extern void TTCN_warning_end();
35
36 extern void TTCN_pattern_error(const char *error_msg, ...)
37 __attribute__ ((__format__ (__printf__, 1, 2), __noreturn__));
38 extern void TTCN_pattern_warning(const char *warning_msg, ...)
39 __attribute__ ((__format__ (__printf__, 1, 2)));
40
41 #endif
This page took 0.031929 seconds and 5 git commands to generate.