Modify

Opened 11 years ago

Closed 11 years ago

#2919 closed Feature Request (Rejected)

OnAutoItExitRegister - @exitMethod - after Crash

Reported by: mLipok Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:

Description

Please add new @exitMethod

here is repro:

OnAutoItExitRegister('_My_Exit')

_UngracefulExit()
Func _UngracefulExit()
	Local $a[1]
	MsgBox(0, 0, $a[3])
EndFunc   ;==>_UngracefulExit

Func _My_Exit()
	MsgBox(0, '_my_Exit()', '@exitCode: ' & @exitCode & @CRLF & '@exitMethod: ' & @exitMethod)
EndFunc   ;==>_My_Exit

Attachments (0)

Change History (7)

comment:1 by BrewManNH, 11 years ago

You do know the difference between an exit and a crash right? The script isn't exiting, AutoIt has detected an error and shut down, HUGE difference.

comment:2 by mLipok, 11 years ago

But it is not HardCrash, and OnAutoItExitRegister function is called.
So the description: "0 = Natural closing." is far from the truth.

Better would be something like: "5 = Exit with AutoIt error".

comment:3 by BrewManNH, 11 years ago

I never said it was a hard crash, I said it was a crash.

You're not exiting, you're erroring out of the script. At that point AutoIt stops processing the code and just shuts down, it does not go through an exit process, from what I understand, it's just stopping and because it just stops, the @ExitMethod doesn't come into it.

comment:4 by BrewManNH, 11 years ago

This request is nearly identical to #2488, the only difference is the way you accessed the array, and the name you give to the @ExitMethod. That one was closed and now nearly a year later you're back to try it again?

comment:5 by mLipok, 11 years ago

I totally forgot about that.
But I still think it's a good idea.

I'm sorry for reheating old themes.

... Can be closed.

comment:6 by mLipok, 11 years ago

btw.
This issue reminded me of the way this post:
http://www.autoitscript.com/forum/topic/164867-is-a-crash-more-powerful-than-an-exit/#entry1203304

After deliberation, please:
supplement documentation for OnAutoItExitRegister
inside the section: Remarks

comment:7 by guinness, 11 years ago

Resolution: Rejected
Status: newclosed

I am rejecting for reasons already provided.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.