15 class SPARK_BASE_EXPORT
Exception :
public std::runtime_error
18 explicit Exception(
const char* class_name,
const std::string_view& message,
const std::source_location& source_location)
19 : std::runtime_error(FormatMessage(class_name, message, source_location).c_str()) {}
29 static std::string FormatMessage(
const char* class_name,
const std::string_view& message,
const std::source_location& source_location)
31 return std::format(
"Exception of type {0} has been thrown.\nError happen in {1}:{2}.\nException contains the message:\n{3}",
33 source_location.file_name(),
34 source_location.line(),