You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing, though... Wouldn't it be better if client applications could respond to the specific error conditions reported by the UpdateManager class without having to parse the messages and guess? Let me propose the use of specialized exception classes to replace the bare System.Exceptions thrown today:
using(varmgr=newUpdateManager(squirrelSource)){try{awaitmgr.UpdateApp();}catch(SquirrelNoUpdateExceptionex){// TODO: Deal with missing Update.exe,// including ignoring it if we're running from source}catch(SquirrelReleasesMissingExceptionex){// TODO: Deal with missing Releases folder}catch(SquirrelReleasesCorruptExceptionex){// TODO: Deal with empty/corrupt RELEASES file}// otherwise continue throwing}
All three exceptions noted above would be derived from SquirrelBaseException, so you have exactly the precision you need when customizing your catch blocks.
As noted above, I've implemented this in my fork, and I'll have a PR to you shortly.
The text was updated successfully, but these errors were encountered:
Thanks for a great product!
One thing, though... Wouldn't it be better if client applications could respond to the specific error conditions reported by the
UpdateManager
class without having to parse the messages and guess? Let me propose the use of specialized exception classes to replace the bareSystem.Exception
s thrown today:All three exceptions noted above would be derived from
SquirrelBaseException
, so you have exactly the precision you need when customizing yourcatch
blocks.As noted above, I've implemented this in my fork, and I'll have a PR to you shortly.
The text was updated successfully, but these errors were encountered: