AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Suppress Errors

 
Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Conquer



Joined: 27 Jun 2006
Posts: 385
Location: Canada

PostPosted: Sat Jan 12, 2008 4:55 pm    Post subject: Suppress Errors Reply with quote

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.
Back to top
View user's profile Send private message
Tuncay



Joined: 07 Nov 2006
Posts: 1886
Location: Germany

PostPosted: Sat Jan 12, 2008 5:21 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Conquer



Joined: 27 Jun 2006
Posts: 385
Location: Canada

PostPosted: Sat Jan 12, 2008 5:43 pm    Post subject: Reply with quote

Yes!!! Label action would be very nice.
Back to top
View user's profile Send private message
Andreone



Joined: 20 Jul 2007
Posts: 257
Location: Paris, France

PostPosted: Mon Jan 21, 2008 7:38 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
daonlyfreez



Joined: 16 Mar 2005
Posts: 949
Location: Berlin

PostPosted: Tue Jan 22, 2008 1:45 pm    Post subject: Reply with quote

I agree with Andreone, an OnError label would be nice to have...
_________________
mirror 1mirror 2mirror 3ahk4.me • PM or
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group