Page 1 of 1
Help with Error Message
Posted: Mon Jan 10, 2011 8:52 am
by interactbooks
I am using the S3 library, in my development environment everything looks fine, however in standalone mode I receive an error which I have enclosed. My question is how do I go back making heads or tails out of this error. I'm not even sure how to proceed since there does not seem to be any useful information being provided with this error.
Re: Help with Error Message
Posted: Mon Jan 10, 2011 12:08 pm
by Janschenkel
The
revMacFromUnixPath function is part of the 'revCommon' backscript. You'll need to make sure it's included in the standalone.
Jan Schenkel.
Re: Help with Error Message
Posted: Mon Jan 10, 2011 3:44 pm
by interactbooks
Jan,
Isn't the RevCommon already included automatically when I build the stack? I don't see a choice for this library in the StandAlone settings. Also, this specific function seems to work very intermittently, I can't really figure out a pattern when it works and when it does not. Could you let me know how to ensure that revCommon is included? In general how do I make sense of the errors that are returned by LiveCode, this is probably my greatest point of confusion, otherwise I love the environment.
Thanks so much,
Ezra
Re: Help with Error Message
Posted: Mon Jan 10, 2011 11:02 pm
by mwieder
If you were running PowerDebug you could open the messagebox and type
and see "Function: error in function handler"
I think Mark Schonwille has something on his website that does something similar. I don't have the url handy, but I'm sure he'll post something here shortly.
Or you could go the long way around and type in the messagebox
Code: Select all
put line x of the cErrorsList of stack "revErrorDisplay"
where x is the first item of one of the lines in the error listing.
Re: Help with Error Message
Posted: Tue Jan 11, 2011 3:15 pm
by kray
interactbooks wrote:I am using the S3 library, in my development environment everything looks fine, however in standalone mode I receive an error which I have enclosed. My question is how do I go back making heads or tails out of this error. I'm not even sure how to proceed since there does not seem to be any useful information being provided with this error.
Basically, the errors returned shows you the 'path' to the actual error that was generated. There's 3 or 4 items on each line, in this format:
- <errorCode>,<errorLine>,<errorChar>[,<errorObjectOrHandler>]
The
errorCode you need to look up in stack "revErrorDisplay" (as Mark pointed out) to find the English translation of what the error code means. The
errorLine and
errorChar are the line number and character on that line in the script of the object where the problem was encountered. The
errorObjectOrHandler is either the LiveCode object that owned the script that generated the error (these would be the lines that start with "353,0,0") or the handler name in the script that contained the line that errored out.
The error lines are to be read in a "bottom-up" fashion, where the last line is the object where the error originated (effectively the object that received the first event that ended up triggering the error), and the first line is the handler that actually generated the error.
So in the screenshot you provided the error lines translate to:
Code: Select all
Function: error in function handler / Line: 1832 / Char: 9 / Handler: revMacFromUnixPath
Operators &: error in left operand / Line: 1832 / Char: 35
put: error in expression / Line: 1832 / Char: 1
Object: stack "/Users/Rachael/Downloads/InteractBuilder.app/Contents/MacOS/lib3.rev"
Function: error in function handler / Line: 279 / Char: 35
Function: error in function handler / Line: 279 / Char: 35
Operators and: error in right operand/ Line: 279 / Char: 23
if-then: error in condition expression / Line: 279 / Char: 1
Handler: error in statement / Line: 279 / Char: 1 / Handler: s3.uploadFile
Object: stack "/Users/Rachael/Downloads/InteractBuilder.app/Contents/MacOS/lib3.rev"
Handler: can't find handler / Line: 55 / Char: 1 / Handler: s3.uploadFile
Handler: error in statement / Line: 55 / Char: 1 / Handler: uploadFileToS3
Object: image id 21405 of group id 19534 of card id 1002 of stack "/Users/Rachael/Downloads/InteractBuilder.app/Contents/MacOS/InteractBuilder"
Handler: can't find handler / Line: 15 / Char: 1 / Handler: UploadFileToS3
if-then: error in statement / Line: 14 / Char: 1
:
(etc.)
Not all of the lines were displayed in the answer dialog, so I can't see the originating object, but the key line here is actually the second one:
Code: Select all
Operators &: error in left operand / Line: 1832 / Char: 35
It sounds like you're trying to use "&" in a bad way when calling revMacFromUnixPath in that script. I'd start there...
Ken
Re: Help with Error Message
Posted: Tue Jan 11, 2011 6:34 pm
by mwieder
...and I completely missed the fact that this error is being generated in a standalone app. Since you're using the lib3.rev library and presumably haven't changed its code, it looks like you're passing a bad parameter to the revMacFromUnix function. And the calling chain seems to be
uploadFileToS3
--> s3.uploadFile
----> isPackage
------> revMacFromUnix
The "can't find handler" errors in uploadFileToS3 are suspicious. If this works in the IDE but not in a standalone, then this possibly may be something with the defaultFolder.
Re: Help with Error Message
Posted: Tue Jan 11, 2011 10:16 pm
by interactbooks
Ken and Mark,
Thank you for all your help. This really helps clarify in my mind how to handle error in LiveCode. I really am so thrilled to be involved in such a vibrant and helping community!!!! This just really solidifies in my mind that I chose the right platform.
Thank you again,
Ezra
Re: Help with Error Message
Posted: Sat Jan 22, 2011 3:19 am
by Mark
Hi,
A quick way to look up error codes is
http://runrev.info/error.html
Best,
(another) Mark