lean2/src/util/script_exception.h

24 lines
647 B
C
Raw Normal View History

/*
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#pragma once
#include "util/exception.h"
namespace lean {
/**
\brief Base class for exceptions producing when evaluating scripts.
*/
class script_exception : public exception {
public:
enum class source { String, File, Unknown };
virtual source get_source() const = 0;
virtual char const * get_filename() const = 0;
virtual unsigned get_line() const = 0;
virtual char const * get_msg() const noexcept = 0;
virtual char const * what() const noexcept;
};
}