Open shawnrice opened 10 years ago
Check commit eed254d53d0e7b7802819523cb570dbc32fa3008 for my AppleScript version. Does this look good? I tried to do as much, but no more, than what your PHP and Bash examples had.
Yeah, that looks good. It really just needs to be some sample code for people who want to implement error handling. I mean for it just to be a copy/paste/alter job for users.
Question: should
else if {21, 21} contains enum then
be
else if {21, 22} contains enum then
?
And could we simplify the beginning (stripping comments for this thread) from
on _bundler()
set pwd to POSIX path of ((path to me as text) & "::")
set bundlet to load script pwd & "alfred.bundler.scpt"
set bundler to bundlet's load_bundler()
end _bundler
try
set bundler to my _bundler()
on error emsg number enum
to
try
set bundlet to load script pwd POSIX path of ((path to me as text) & "::") "alfred.bundler.scpt"
set bundler to bundlet's load_bundler()
on error emsg number enum
?
Basically, could we get rid of the extra handler and just put that in the "try" statement?
Changed. Applescript should be all set
So, I put together an "implementation" page that shows a sort of "best" practices for initializing the Bundler.
I have sample code currently for Ruby and PHP to catch exceptions, and I'll push some shortly for a Bash trap.
@smargh Can you do the code for the AppleScript? And can someone else do the code for the Python?