AutoHotkey Community

It is currently May 26th, 2012, 2:41 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Suppress Errors
PostPosted: January 12th, 2008, 5:55 pm 
Offline

Joined: June 27th, 2006, 2:38 pm
Posts: 385
Location: Canada
Something like #SuppressErrors to stop all error messages from showing. Useful for a professional script program that has its own error dialogs and such. Thanks for consideration or feedback.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 12th, 2008, 6:21 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1933
Location: Germany
Better than something like this, a try...catch command would be better. Or disabling all error dialogs would be mean to need implementing all error dialogs by user.

And what is, if any other script (library) implemented an own error catch code?

Or: #Catch ErrorNameOrCode LabelToExecute.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 12th, 2008, 6:43 pm 
Offline

Joined: June 27th, 2006, 2:38 pm
Posts: 385
Location: Canada
Yes!!! Label action would be very nice.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 21st, 2008, 8:38 pm 
Offline

Joined: July 20th, 2007, 10:23 am
Posts: 257
Location: Paris, France
I was recently thinking of a way to suppress automatic errors too.
I came up with the idea of a simple statement:
Code:
OnError,  ErrorSub
return ; end of the auto execute section

ErrorSub:
If(ErrorReason != "Hotkey")
    ExitApp
return ; i.e. continue script
like OnExit, ExitSub.
It simple and similar to what other language provides.
ErrorReason is just an idea.
Built-in error variables need refinements, but here's what I see
ErrorReason (the function that raises the error)
ErrorText
ErrorNumber
ErrorLine
ErrorFile


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2008, 2:45 pm 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 968
Location: Frisia
I agree with Andreone, an OnError label would be nice to have...

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Yahoo [Bot] and 7 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group