1
0

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

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

View File

@@ -25,6 +25,15 @@ class SmileBasicError : Exception
super(message);
this.message2 = message2;
}
string getErrorMessage()
{
return this.msg;
}
//詳細
string getErrorMessage2()
{
return message2;
}
}
class SyntaxError : SmileBasicError
{

View File

@@ -808,7 +808,9 @@ class PetitComputer
running = false;
try
{
printConsole(sbe.to!string);
printConsole(sbe.getErrorMessage, "\n");
printConsole(sbe.getErrorMessage2, "\n");
//printConsole(sbe.to!string);
writeln(sbe.to!string);
}
catch