AbortWithErrorMessage.hpp
Go to the documentation of this file.
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 /// \file
5 /// Declares function abort_with_error_message
6 
7 #pragma once
8 
9 #include <string>
10 
11 /// \ingroup ErrorHandlingGroup
12 /// Compose an error message with an expression and abort the program.
13 [[noreturn]] void abort_with_error_message(const char* expression,
14  const char* file, int line,
15  const char* pretty_function,
16  const std::string& message);
17 
18 /// \ingroup ErrorHandlingGroup
19 /// Compose an error message and abort the program.
20 [[noreturn]] void abort_with_error_message(const char* file, int line,
21  const char* pretty_function,
22  const std::string& message);
void abort_with_error_message(const char *expression, const char *file, int line, const char *pretty_function, const std::string &message)
Compose an error message with an expression and abort the program.
Definition: AbortWithErrorMessage.cpp:12