-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added InternalError with SourceLocation (#35)
- Loading branch information
1 parent
051764f
commit 830ff6d
Showing
5 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#ifndef CUCUMBER_CPP_INTERNALERROR_HPP | ||
#define CUCUMBER_CPP_INTERNALERROR_HPP | ||
|
||
#include <source_location> | ||
#include <stdexcept> | ||
|
||
namespace cucumber_cpp | ||
{ | ||
struct InternalError : std::runtime_error | ||
{ | ||
InternalError(std::string str, std::source_location sourceLocation = std::source_location::current()) | ||
: std::runtime_error{ std::move(str) } | ||
, sourceLocation{ sourceLocation } | ||
{} | ||
|
||
const std::source_location sourceLocation; | ||
}; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters