Merge pull request #62 from BenceJanosSzabo/master
[deliverable/titan.core.git] / core / Error.hh
CommitLineData
d44e3c4f 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 ******************************************************************************/
970ed795
EL
16#ifndef ERROR_HH
17#define ERROR_HH
18
19class TC_End { };
20
21class TC_Error { };
22
23class TTCN_Error : public TC_Error {
24 char* error_msg;
25public:
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
31extern void TTCN_error(const char *err_msg, ...)
32 __attribute__ ((__format__ (__printf__, 1, 2), __noreturn__));
33extern void TTCN_error_begin(const char *err_msg, ...)
34 __attribute__ ((__format__ (__printf__, 1, 2)));
35extern void TTCN_error_end()
36 __attribute__ ((__noreturn__));
37
38void TTCN_warning(const char *warning_msg, ...)
39 __attribute__ ((__format__ (__printf__, 1, 2)));
40extern void TTCN_warning_begin(const char *warning_msg, ...)
41 __attribute__ ((__format__ (__printf__, 1, 2)));
42extern void TTCN_warning_end();
43
44extern void TTCN_pattern_error(const char *error_msg, ...)
45 __attribute__ ((__format__ (__printf__, 1, 2), __noreturn__));
46extern void TTCN_pattern_warning(const char *warning_msg, ...)
47 __attribute__ ((__format__ (__printf__, 1, 2)));
48
49#endif
This page took 0.025407 seconds and 5 git commands to generate.