externals and Rev 2.7.x -- Whoops!
dsc at swcp.com
Tue Sep 26 18:22:40 CDT 2006
On Sep 26, 2006, at 4:33 PM, Dar Scott wrote:
> However, with recent change in the IDE, this is not too bad:
> put false into bad
> put the defaultFolder into savedDefaultFolder
> set the defaultfolder to defaultFolderForThisTask
> ... blah blah blah ...
> catch e
> put true into bad -- throw is broken here
> set the defaultFolder to savedDefaultFolder
> end try
> if bad then throw "Error when loading external."
> It would be simpler if an error could reliably be thrown in the
> catch section.
I goofed. I was trying to give an example of what to do to keep from
changing defaultFolder so it would be OK when an external is loaded.
I worded the 'throw' above as if the external was loaded in the "...
blah blah blah ...".
The last line is better like this:
if bad then throw "Error while defaultFolder was changed."
Or whatever is appropriate for the particular situation.
All the more why 'catch' should be optional.
More information about the use-livecode