ladybird/Userland/Libraries/LibJS/Runtime/Exception.h
Brian Gianforcaro 1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00

34 lines
784 B
C++

/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Vector.h>
#include <LibJS/Runtime/Cell.h>
#include <LibJS/Runtime/Value.h>
#include <LibJS/SourceRange.h>
namespace JS {
class Exception : public Cell {
public:
explicit Exception(Value);
virtual ~Exception() override;
Value value() const { return m_value; }
const Vector<String>& trace() const { return m_trace; }
const Vector<SourceRange>& source_ranges() const { return m_source_ranges; }
private:
virtual const char* class_name() const override { return "Exception"; }
virtual void visit_edges(Visitor&) override;
Value m_value;
Vector<String> m_trace;
Vector<SourceRange> m_source_ranges;
};
}