エラー表示を分かりやすくした

This commit is contained in:
otya128 committed 2015-08-23 11:21:37 +09:00
1 parent 5852e38cdb
commit d7f0fced6f
2 files changed
+12 -1

No files matched your search

+9
View File
@@ -25,6 +25,15 @@ class SmileBasicError : Exception
super(message); super(message);
this.message2 = message2; this.message2 = message2;
} }
string getErrorMessage()
{
return this.msg;
}
//詳細
string getErrorMessage2()
{
return message2;
}
} }
class SyntaxError : SmileBasicError class SyntaxError : SmileBasicError
{ {
+3 -1
View File
@@ -808,7 +808,9 @@ class PetitComputer
running = false; running = false;
try try
{ {
printConsole(sbe.to!string); printConsole(sbe.getErrorMessage, "\n");
printConsole(sbe.getErrorMessage2, "\n");
//printConsole(sbe.to!string);
writeln(sbe.to!string); writeln(sbe.to!string);
} }
catch catch