Re: How to intercept exceptions in Carbon
Re: How to intercept exceptions in Carbon
- Subject: Re: How to intercept exceptions in Carbon
- From: Dieter Oberkofler <email@hidden>
- Date: Mon, 13 Aug 2007 11:10:47 +0200
GG,
You are perfectly right but unfortunately "we" are human and DO make
errors and even if "we" would not, some 3rd party library will for sure.
The point is how to deal with them and (generally speaking) I prefer
to intercept, log and report them in a way similar to how the Apple
Crash Reporter works.
It would also be fine to use the Crash Reporter but unfortunately
this tools does not have to active all the time, does not allow to
customize the information to report and most important of all to send
the information to the application vendor instead of Apple.
To be more precise, I would like to create an application based error
handler similar to the Apple Crash Reporter and intercept all or as
many as possible exception thrown by Hardware, System Software and
Applications Software.
Cheers,
-Dieter
On 11.08.2007, at 20:29, Greg Guerin wrote:
Dieter Oberkofler wrote:
What would be the "best practice" to programmatically intercept
system
exceptions (e.g. EXC_BAD_ACCESS) in a Carbon/C++ based application?
Perhaps the BEST practice is to not cause illegal accesses: i.e.
debug your code.
If you have a valid reason for catching signals that represent fatal
errors, see 'man signal' or 'man sigaction'. The sigaction entry also
lists the signals and their nominal cause, and functions you can
safely
call from handlers.
There really aren't any other ways of catching and responding to
signals,
so it's left to you to choose between them and decide which one
best meets
your intended purpose.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40qualiant.at
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden