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

@ -25,6 +25,7 @@
#include <iostream>
#include <parser/data.hh>
#include <utils/mu-error.hh>
namespace Mu {
@ -62,7 +63,7 @@ struct Node {
case Type::Range: return "range"; break;
case Type::Invalid: return "<invalid>"; break;
default:
throw std::runtime_error ("bug");
throw Mu::Error(Error::Code::Internal, "unexpected type");
}
}