AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
anonymous_namespace{Errors.cpp} Namespace Reference

Functions

MakeMessage

Make message for display erros

Parameters
messageTypeMessage type (ASSERTION FAILED, FATAL ERROR, ERROR) end etc
filePath to file
lineLine number in file
functionFunctionn name
messageCondition to string format
fmtMessage[optional] Display format message after condition
debugInfo[optional] Display debug info
std::string MakeMessage (std::string_view messageType, std::string_view file, uint32 line, std::string_view function, std::string_view message, std::string_view fmtMessage={}, std::string_view debugInfo={})
 
MakeAbortMessage

Make message for display erros

Parameters
filePath to file
lineLine number in file
functionFunctionn name
fmtMessage[optional] Display format message after condition
std::string MakeAbortMessage (std::string_view file, uint32 line, std::string_view function, std::string_view fmtMessage={})
 

Function Documentation

◆ MakeAbortMessage()

std::string anonymous_namespace{Errors.cpp}::MakeAbortMessage ( std::string_view  file,
uint32  line,
std::string_view  function,
std::string_view  fmtMessage = {} 
)
inline
91 {})
92 {
93 std::string msg = Acore::StringFormatFmt("\n>> ABORTED\n\n# Location '{}:{}'\n# Function '{}'\n", file, line, function);
94
95 if (!fmtMessage.empty())
96 {
97 msg.append(Acore::StringFormatFmt("# Message '{}'\n", fmtMessage));
98 }
99
101 "\n#{0:-^{2}}#\n"
102 " {1: ^{2}} \n"
103 "#{0:-^{2}}#\n", "", msg, 70);
104 }
std::string StringFormatFmt(FormatString< Args... > fmt, Args &&... args)
Definition: StringFormat.h:48

Referenced by Acore::Abort().

◆ MakeMessage()

std::string anonymous_namespace{Errors.cpp}::MakeMessage ( std::string_view  messageType,
std::string_view  file,
uint32  line,
std::string_view  function,
std::string_view  message,
std::string_view  fmtMessage = {},
std::string_view  debugInfo = {} 
)
inline
63 {}, std::string_view debugInfo = {})
64 {
65 std::string msg = Acore::StringFormatFmt("\n>> {}\n\n# Location '{}:{}'\n# Function '{}'\n# Condition '{}'\n", messageType, file, line, function, message);
66
67 if (!fmtMessage.empty())
68 {
69 msg.append(Acore::StringFormatFmt("# Message '{}'\n", fmtMessage));
70 }
71
72 if (!debugInfo.empty())
73 {
74 msg.append(Acore::StringFormatFmt("\n# Debug info: '{}'\n", debugInfo));
75 }
76
78 "#{0:-^{2}}#\n"
79 " {1: ^{2}} \n"
80 "#{0:-^{2}}#\n", "", msg, 70);
81 }

Referenced by Acore::Assert(), Acore::Error(), Acore::Fatal(), and Acore::Warning().