VirtualC64 v5.0 beta
Commodore 64 Emulator
Loading...
Searching...
No Matches
Error.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// This file is part of VirtualC64
3//
4// Copyright (C) Dirk W. Hoffmann. www.dirkwhoffmann.de
5// This FILE is dual-licensed. You are free to choose between:
6//
7// - The GNU General Public License v3 (or any later version)
8// - The Mozilla Public License v2
9//
10// SPDX-License-Identifier: GPL-3.0-or-later OR MPL-2.0
11// -----------------------------------------------------------------------------
13
14#pragma once
15
16#include "ErrorTypes.h"
17#include "Exception.h"
18#include <filesystem>
19
20namespace vc64 {
21
23struct Error : public util::Exception
24{
25 Error(ErrorCode code, const string &s);
26 Error(ErrorCode code, const char *s) : Error(code, string(s)) { };
27 Error(ErrorCode code, const std::filesystem::path &path) : Error(code, path.string()) { };
28 Error(ErrorCode code, long v) : Error(code, std::to_string(v)) { };
29 Error(ErrorCode code) : Error(code, "") { }
30
32 const char *what() const throw() override;
33};
34
35}
VirtualC64 project namespace.
Definition CmdQueue.cpp:16
ERROR_CODE
Error condition.
Definition ErrorTypes.h:22
Emulator exception.
Definition Error.h:24
const char * what() const override
Returns a textual description of this error.
Definition Error.cpp:259
Base class for all emulator exceptions.
Definition Exception.h:22