lib: Use Mu:Error exception

Where applicable.
This commit is contained in:
Dirk-Jan C. Binnema
2019-12-30 22:28:53 +02:00
parent dfafecaf0c
commit 97afdd9e3c
7 changed files with 37 additions and 24 deletions

View File

@ -19,6 +19,7 @@
#include "parser.hh"
#include "tokenizer.hh"
#include "utils/mu-utils.hh"
#include "utils/mu-error.hh"
using namespace Mu;
@ -36,7 +37,7 @@ using namespace Mu;
// <regex> -> [field:]/regex/
#define BUG(...) std::runtime_error (format("%u: BUG: ",__LINE__) \
#define BUG(...) Mu::Error (Error::Code::Internal, format("%u: BUG: ",__LINE__) \
+ format(__VA_ARGS__))
static Token