SA_Logger
Sapphire's Suite's C++ Logger.
Loading...
Searching...
No Matches
Exception.hpp
Go to the documentation of this file.
1// Copyright (c) 2023 Sapphire's Suite. All Rights Reserved.
2
3#pragma once
4
5#ifndef SAPPHIRE_LOGGER_EXCEPTION_GUARD
6#define SAPPHIRE_LOGGER_EXCEPTION_GUARD
7
9
20namespace SA
21{
23 class Exception : public Log
24 {
25 public:
27 struct BaseInfo
28 {
30 std::wstring file;
31
33 uint32_t line;
34
36 std::string function;
37
39 std::wstring chanName;
40
42 std::wstring details;
43
45 uint32_t frameNum;
46 };
47
56 BaseInfo _info,
57 bool _pred,
58 std::wstring _msg = L""
59 ) noexcept;
60 };
61
64
65
67
69 #define __SA_CREATE_EXCEPTION_Default(_baseInfo, _pred, ...) SA::Exception_Default(\
70 _baseInfo,\
71 _pred,\
72 SA_WSTR(_pred) L"\tevaluated to false!"\
73 )
74
76}
77
78
81#endif // GUARD
Log type implementation.
Default (base) Exception type.
Definition Exception.hpp:24
Exception(BaseInfo _info, bool _pred, std::wstring _msg=L"") noexcept
Log type implementation.
Definition Log.hpp:25
Base exception create info.
Definition Exception.hpp:28
std::string function
Function name.
Definition Exception.hpp:36
uint32_t line
line number.
Definition Exception.hpp:33
std::wstring chanName
LogChannel name.
Definition Exception.hpp:39
std::wstring file
File name.
Definition Exception.hpp:30
std::wstring details
Additional details string.
Definition Exception.hpp:42
uint32_t frameNum
Frame num.
Definition Exception.hpp:45