DryChem 1.0.0
A generic, compile-time C++ toolbox with no dependencies for the modern computational chemistry project.
Loading...
Searching...
No Matches
errorTypes.hpp
Go to the documentation of this file.
1// Copyright (c) 2020-2025 Cody R. Drisko. All rights reserved.
2// Licensed under the MIT License. See the LICENSE file in the project root for more information.
3//
4// Name: errorTypes.hpp
5// Author: crdrisko
6// Date: 08/26/2020-14:53:34
7// Description: Common types to be used with the various error handling techniques
8
9#ifndef DRYCHEM_COMMON_UTILITIES_INCLUDE_COMMON_UTILS_ERRORS_UTILS_ERRORTYPES_HPP
10#define DRYCHEM_COMMON_UTILITIES_INCLUDE_COMMON_UTILS_ERRORS_UTILS_ERRORTYPES_HPP
11
12#include <cstddef>
13#include <string>
14
15namespace CppUtils::Errors
16{
21 enum class ErrorSeverity
22 {
25 };
26
32 {
33 std::string programName {};
34 std::string message {};
35 std::string fileName {};
36 std::size_t lineNumber {};
37 };
38} // namespace CppUtils::Errors
39
40#endif
Definition fatalException.hpp:20
ErrorSeverity
Definition errorTypes.hpp:22
@ Warning
Describes the severity of an error that only requires a warning.
Definition errorTypes.hpp:23
@ Fatal
Describes the severity of a fatal, non-recoverable error.
Definition errorTypes.hpp:24
Definition errorTypes.hpp:32
std::size_t lineNumber
The line number where the error took place, use the LINE macro.
Definition errorTypes.hpp:36
std::string programName
The name of the program where the exception originated.
Definition errorTypes.hpp:33
std::string fileName
The file name where the error took place, use the FILE macro.
Definition errorTypes.hpp:35
std::string message
The main error message describing the error.
Definition errorTypes.hpp:34