Assembler (#6)
Co-authored-by: Andre Wagner <WagnerAndre@JohnDeere.com> Reviewed-on: https://192.168.5.48/andre/tyche/pulls/6
This commit was merged in pull request #6.
This commit is contained in:
18
src/assembler/as_exceptions.hh
Normal file
18
src/assembler/as_exceptions.hh
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef TYCHE_VM_EXCEPTIONS_HH
|
||||
#define TYCHE_VM_EXCEPTIONS_HH
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
namespace tyche::as {
|
||||
|
||||
class AssemblyError : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
explicit AssemblyError(std::string const& str, size_t line, size_t column)
|
||||
: std::runtime_error((str + " at: line " + std::to_string(line) + ", column: " + std::to_string(column)).c_str()) {}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //TYCHE_VM_EXCEPTIONS_HH
|
||||
Reference in New Issue
Block a user