/* * Copyright (c) 2020, Andreas Kling * Copyright (c) 2021, Linus Groh * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace JS { struct TracebackFrame { FlyString function_name; SourceRange source_range; }; class Exception : public Cell { public: explicit Exception(Value); virtual ~Exception() override = default; Value value() const { return m_value; } const Vector& traceback() const { return m_traceback; } private: virtual const char* class_name() const override { return "Exception"; } virtual void visit_edges(Visitor&) override; Value m_value; Vector m_traceback; }; }