diff --git a/SMILEBASIC/error.d b/SMILEBASIC/error.d index f1fdf49..9a3c8a2 100644 --- a/SMILEBASIC/error.d +++ b/SMILEBASIC/error.d @@ -25,6 +25,15 @@ class SmileBasicError : Exception super(message); this.message2 = message2; } + string getErrorMessage() + { + return this.msg; + } + //詳細 + string getErrorMessage2() + { + return message2; + } } class SyntaxError : SmileBasicError { diff --git a/SMILEBASIC/petitcomputer.d b/SMILEBASIC/petitcomputer.d index b3bfd24..edf104b 100644 --- a/SMILEBASIC/petitcomputer.d +++ b/SMILEBASIC/petitcomputer.d @@ -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