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.
6 #include "Exceptions.h"
8 using namespace antlr4;
10 RuntimeException::RuntimeException(const std::string &msg) : std::exception(), _message(msg) {
13 const char* RuntimeException::what() const NOEXCEPT {
14 return _message.c_str();
17 //------------------ IOException ---------------------------------------------------------------------------------------
19 IOException::IOException(const std::string &msg) : std::exception(), _message(msg) {
22 const char* IOException::what() const NOEXCEPT {
23 return _message.c_str();
26 //------------------ IllegalStateException -----------------------------------------------------------------------------
28 IllegalStateException::~IllegalStateException() {
31 //------------------ IllegalArgumentException --------------------------------------------------------------------------
33 IllegalArgumentException::~IllegalArgumentException() {
36 //------------------ NullPointerException ------------------------------------------------------------------------------
38 NullPointerException::~NullPointerException() {
41 //------------------ IndexOutOfBoundsException -------------------------------------------------------------------------
43 IndexOutOfBoundsException::~IndexOutOfBoundsException() {
46 //------------------ UnsupportedOperationException ---------------------------------------------------------------------
48 UnsupportedOperationException::~UnsupportedOperationException() {
51 //------------------ EmptyStackException -------------------------------------------------------------------------------
53 EmptyStackException::~EmptyStackException() {
56 //------------------ CancellationException -----------------------------------------------------------------------------
58 CancellationException::~CancellationException() {
61 //------------------ ParseCancellationException ------------------------------------------------------------------------
63 ParseCancellationException::~ParseCancellationException() {