Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 3608839

Browse files
Merge pull request #1939 from montegoulding/bugfix-21093
[[ Bug 21093 ]] Handle thrown errors
2 parents f5950ed + 5372a95 commit 3608839

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

Toolset/libraries/revdebuggerlibrary.livecodescript

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,6 +2071,9 @@ command revDebuggerUpdateScriptEditor pObject, pHandler, pLine, pState, pError
20712071
revGoScriptEditor the name of stack tScriptEditor
20722072

20732073
if pError is not empty then
2074+
if the number of items of pError is 1 then
2075+
put comma & pLine after pError
2076+
end if
20742077
# OK-2008-07-10 : This needs to be sent in time so that it arrives after the script
20752078
# editor has finished initializing itself.
20762079
send "revSEDisplayExecutionError pError, pObject" to stack tScriptEditor in 0 milliseconds

Toolset/libraries/revidelibrary.8.livecodescript

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11876,7 +11876,14 @@ function revIDELookupError pType, pError
1187611876
else if tCode is kExternalHandlerErrorCode then
1187711877
return "External handler execution error:" && item 4 to -1 of line 1 of pError
1187811878
end if
11879-
return line tCode of the scriptExecutionErrors
11879+
11880+
if tCode is an integer then
11881+
get line tCode of the scriptExecutionErrors
11882+
if it is not empty then
11883+
return it
11884+
end if
11885+
end if
11886+
return tCode
1188011887
else if pType is "warning" then
1188111888
return empty
1188211889
end if

notes/bugfix-21093.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix the display of errors thrown by the throw command in the script editor

0 commit comments

Comments
 (0)