1
1
mirror of https://github.com/kanaka/mal.git synced 2024-08-17 01:30:26 +03:00

fix print privous return value in repl error

This commit is contained in:
OldLiu 2023-07-08 13:03:26 +08:00
parent b61c6482c2
commit 96cda20bfa
10 changed files with 40 additions and 30 deletions

View File

@ -19,12 +19,13 @@ Sub REPL()
Dim strRes
On Error Resume Next
strRes = REP(strCode)
If strRes <> "" Then
WScript.Echo strRes
End If
If Err.Number <> 0 Then
'WScript.StdErr.WriteLine Err.Source + ": " + Err.Description
WScript.StdErr.WriteLine "Exception: " + Err.Description
Else
If strRes <> "" Then
WScript.Echo strRes
End If
End If
On Error Goto 0
Wend

View File

@ -102,12 +102,13 @@ Sub REPL()
Dim strRes
On Error Resume Next
strRes = REP(strCode)
If strRes <> "" Then
WScript.Echo strRes
End If
If Err.Number <> 0 Then
'WScript.StdErr.WriteLine Err.Source + ": " + Err.Description
WScript.StdErr.WriteLine "Exception: " + Err.Description
Else
If strRes <> "" Then
WScript.Echo strRes
End If
End If
On Error Goto 0
Wend

View File

@ -113,12 +113,13 @@ Sub REPL()
Dim strRes
On Error Resume Next
strRes = REP(strCode)
If strRes <> "" Then
WScript.Echo strRes
End If
If Err.Number <> 0 Then
'WScript.StdErr.WriteLine Err.Source + ": " + Err.Description
WScript.StdErr.WriteLine "Exception: " + Err.Description
Else
If strRes <> "" Then
WScript.Echo strRes
End If
End If
On Error Goto 0
Wend

View File

@ -127,12 +127,13 @@ Sub REPL()
Dim strRes
On Error Resume Next
strRes = REP(strCode)
If strRes <> "" Then
WScript.Echo strRes
End If
If Err.Number <> 0 Then
'WScript.StdErr.WriteLine Err.Source + ": " + Err.Description
WScript.StdErr.WriteLine "Exception: " + Err.Description
Else
If strRes <> "" Then
WScript.Echo strRes
End If
End If
On Error Goto 0
Wend

View File

@ -136,12 +136,13 @@ Sub REPL()
Dim strRes
On Error Resume Next
strRes = REP(strCode)
If strRes <> "" Then
WScript.Echo strRes
End If
If Err.Number <> 0 Then
'WScript.StdErr.WriteLine Err.Source + ": " + Err.Description
WScript.StdErr.WriteLine "Exception: " + Err.Description
Else
If strRes <> "" Then
WScript.Echo strRes
End If
End If
On Error Goto 0
Wend

View File

@ -164,12 +164,13 @@ Sub REPL()
Dim strRes
On Error Resume Next
strRes = REP(strCode)
If strRes <> "" Then
WScript.Echo strRes
End If
If Err.Number <> 0 Then
'WScript.StdErr.WriteLine Err.Source + ": " + Err.Description
WScript.StdErr.WriteLine "Exception: " + Err.Description
Else
If strRes <> "" Then
WScript.Echo strRes
End If
End If
On Error Goto 0
Wend

View File

@ -288,12 +288,13 @@ Sub REPL()
Dim strRes
On Error Resume Next
strRes = REP(strCode)
If strRes <> "" Then
WScript.Echo strRes
End If
If Err.Number <> 0 Then
'WScript.StdErr.WriteLine Err.Source + ": " + Err.Description
WScript.StdErr.WriteLine "Exception: " + Err.Description
Else
If strRes <> "" Then
WScript.Echo strRes
End If
End If
On Error Goto 0
Wend

View File

@ -342,12 +342,13 @@ Sub REPL()
Dim strRes
On Error Resume Next
strRes = REP(strCode)
If strRes <> "" Then
WScript.Echo strRes
End If
If Err.Number <> 0 Then
'WScript.StdErr.WriteLine Err.Source + ": " + Err.Description
WScript.StdErr.WriteLine "Exception: " + Err.Description
Else
If strRes <> "" Then
WScript.Echo strRes
End If
End If
On Error Goto 0
Wend

View File

@ -402,9 +402,6 @@ Sub REPL()
Dim strRes
On Error Resume Next
strRes = REP(strCode)
If strRes <> "" Then
WScript.Echo strRes
End If
If Err.Number <> 0 Then
If Err.Source = "MThrow" Then
'WScript.StdErr.WriteLine Err.Source + ": " + _
@ -415,6 +412,10 @@ Sub REPL()
'WScript.StdErr.WriteLine Err.Source + ": " + Err.Description
WScript.StdErr.WriteLine "Exception: " + Err.Description
End If
Else
If strRes <> "" Then
WScript.Echo strRes
End If
End If
On Error Goto 0
Wend

View File

@ -403,9 +403,6 @@ Sub REPL()
Dim strRes
On Error Resume Next
strRes = REP(strCode)
If strRes <> "" Then
WScript.Echo strRes
End If
If Err.Number <> 0 Then
If Err.Source = "MThrow" Then
'WScript.StdErr.WriteLine Err.Source + ": " + _
@ -416,6 +413,10 @@ Sub REPL()
'WScript.StdErr.WriteLine Err.Source + ": " + Err.Description
WScript.StdErr.WriteLine "Exception: " + Err.Description
End If
Else
If strRes <> "" Then
WScript.Echo strRes
End If
End If
On Error Goto 0
Wend