throw_error is now [[ noreturn ]]

This commit is contained in:
apio 2022-06-08 17:39:42 +02:00
parent c962c22017
commit 2452d78205
2 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ void Error::show_import_lines(const Location& loc, void(*import_line_printer)(co
}
}
void Error::throw_error(const Location& loc, const std::string line_text, const std::string& details)
[[noreturn]] void Error::throw_error(const Location& loc, const std::string line_text, const std::string& details)
{
show_import_lines(loc,show_import_line,std::cerr);
@ -77,7 +77,7 @@ void Error::throw_error(const Location& loc, const std::string line_text, const
exit(1);
}
void Error::throw_error_without_location(const std::string& details)
[[noreturn]] void Error::throw_error_without_location(const std::string& details)
{
std::cerr << "\033[1;1m";

View File

@ -5,9 +5,9 @@ namespace Error
{
void show_import_line(const Location& loc, std::ostream& output_stream);
void throw_error(const Location& loc, const std::string line_text, const std::string& details);
[[noreturn]] void throw_error(const Location& loc, const std::string line_text, const std::string& details);
void throw_error_without_location(const std::string& details);
[[noreturn]] void throw_error_without_location(const std::string& details);
void throw_warning(const Location& loc, const std::string line_text, const std::string& details);