]> gitweb.ps.run Git - toc/blob - antlr4-cpp-runtime-4.9.2-source/runtime/src/Exceptions.cpp
add antlr source code and ReadMe
[toc] / antlr4-cpp-runtime-4.9.2-source / runtime / src / Exceptions.cpp
1 /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
2  * Use of this file is governed by the BSD 3-clause license that
3  * can be found in the LICENSE.txt file in the project root.
4  */
5
6 #include "Exceptions.h"
7
8 using namespace antlr4;
9
10 RuntimeException::RuntimeException(const std::string &msg) : std::exception(), _message(msg) {
11 }
12
13 const char* RuntimeException::what() const NOEXCEPT {
14   return _message.c_str();
15 }
16
17 //------------------ IOException ---------------------------------------------------------------------------------------
18
19 IOException::IOException(const std::string &msg) : std::exception(), _message(msg) {
20 }
21
22 const char* IOException::what() const NOEXCEPT {
23   return _message.c_str();
24 }
25
26 //------------------ IllegalStateException -----------------------------------------------------------------------------
27
28 IllegalStateException::~IllegalStateException() {
29 }
30
31 //------------------ IllegalArgumentException --------------------------------------------------------------------------
32
33 IllegalArgumentException::~IllegalArgumentException() {
34 }
35
36 //------------------ NullPointerException ------------------------------------------------------------------------------
37
38 NullPointerException::~NullPointerException() {
39 }
40
41 //------------------ IndexOutOfBoundsException -------------------------------------------------------------------------
42
43 IndexOutOfBoundsException::~IndexOutOfBoundsException() {
44 }
45
46 //------------------ UnsupportedOperationException ---------------------------------------------------------------------
47
48 UnsupportedOperationException::~UnsupportedOperationException() {
49 }
50
51 //------------------ EmptyStackException -------------------------------------------------------------------------------
52
53 EmptyStackException::~EmptyStackException() {
54 }
55
56 //------------------ CancellationException -----------------------------------------------------------------------------
57
58 CancellationException::~CancellationException() {
59 }
60
61 //------------------ ParseCancellationException ------------------------------------------------------------------------
62
63 ParseCancellationException::~ParseCancellationException() {
64 }