Last sync 2016.04.01
[deliverable/titan.core.git] / core / Error.hh
1 /******************************************************************************
2 * Copyright (c) 2000-2016 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 * Contributors:
9 * Balasko, Jeno
10 * Beres, Szabolcs
11 * Delic, Adam
12 * Forstner, Matyas
13 * Szabo, Janos Zoltan – initial implementation
14 *
15 ******************************************************************************/
16 #ifndef ERROR_HH
17 #define ERROR_HH
18
19 class TC_End { };
20
21 class TC_Error { };
22
23 class TTCN_Error : public TC_Error {
24 char* error_msg;
25 public:
26 TTCN_Error(char* p_error_msg): error_msg(p_error_msg) {}
27 char* get_message() const { return error_msg; }
28 ~TTCN_Error();
29 };
30
31 extern void TTCN_error(const char *err_msg, ...)
32 __attribute__ ((__format__ (__printf__, 1, 2), __noreturn__));
33 extern void TTCN_error_begin(const char *err_msg, ...)
34 __attribute__ ((__format__ (__printf__, 1, 2)));
35 extern void TTCN_error_end()
36 __attribute__ ((__noreturn__));
37
38 void TTCN_warning(const char *warning_msg, ...)
39 __attribute__ ((__format__ (__printf__, 1, 2)));
40 extern void TTCN_warning_begin(const char *warning_msg, ...)
41 __attribute__ ((__format__ (__printf__, 1, 2)));
42 extern void TTCN_warning_end();
43
44 extern void TTCN_pattern_error(const char *error_msg, ...)
45 __attribute__ ((__format__ (__printf__, 1, 2), __noreturn__));
46 extern void TTCN_pattern_warning(const char *warning_msg, ...)
47 __attribute__ ((__format__ (__printf__, 1, 2)));
48
49 #endif
This page took 0.030428 seconds and 5 git commands to generate.