On 08/30/2015 05:46 PM, Kay C Lan wrote:

There would seem to be two issues, firstly the different level of
Compilation checking, and secondly, the Dictionary entry for
'scriptParseError' implies that the error message we are going to get is
human readable. What currently is presented in the result is of little use
unless there is documentation to decipher the numbers; although the SE
style error message is really what we want.

Well, yes and no. Unfortunately that message is no longer being sent. There's a bug report in the system to try to get it back, but it's been languishing from lack of attention for quite some time.

The difference in the error texts you're seeing is just the IDE's script editor interpreting the rather cryptic numeric messages you're seeing when you look at the raw data. The lines are of the form

errorNumber, lineNumber, charNumber

and the errorNumber is an index into a list of strings stored in a couple of global properties. There's one list for compilation errors and one list for runtime errors. I wrote a handy function for PowerDebug to show these things because it's awkward trying to remember what the various error numbers mean.

function ExplainError pErrorNum, pErrorType
    local tFunc
    local tResult

    if pErrorType is empty then
        put "runtime" into pErrorType
    end if

    switch pErrorType
        case "compilation"
           put line pErrorNum of the scriptparsingerrors into tResult
            break
        case "runtime"
        default
           put line pErrorNum of the scriptexecutionerrors into tResult
    end switch
    return tResult
end ExplainError

...So the error list you see represents

Expression: bad factor
param: bad expression
Commands: bad parameter
Commands: bad parameters
repeat: error in command
Handler: error in command
Handler: error in handler

and normally it's safe to ignore everything except the first line you receive.

--
 Mark Wieder
 [email protected]

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to