From d7f0fced6f079015689308b7f536a90d279b5857 Mon Sep 17 00:00:00 2001 From: otya128 Date: Sun, 23 Aug 2015 11:21:37 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=82=92=E5=88=86=E3=81=8B=E3=82=8A=E3=82=84=E3=81=99=E3=81=8F?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SMILEBASIC/error.d | 9 +++++++++ SMILEBASIC/petitcomputer.d | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) 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