エラー表示を分かりやすくした
This commit is contained in:
@@ -25,6 +25,15 @@ class SmileBasicError : Exception
|
||||
super(message);
|
||||
this.message2 = message2;
|
||||
}
|
||||
string getErrorMessage()
|
||||
{
|
||||
return this.msg;
|
||||
}
|
||||
//詳細
|
||||
string getErrorMessage2()
|
||||
{
|
||||
return message2;
|
||||
}
|
||||
}
|
||||
class SyntaxError : SmileBasicError
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user