[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.dsdp.rtsc] Re-throwing an error
|
- From: Ramsey Harris <ramsey@xxxxxx>
- Date: Tue, 09 Jun 2009 09:04:32 -0700
- Newsgroups: eclipse.dsdp.rtsc
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.21 (Windows/20090302)
Champs,
Is it safe to call Error_raise() on a signaled error block? Or might some state information from the previous error "leak" into the second error and invalidate its state?
For example, I have some code which requests memory. If the heap runs out of memory, it will raise an error. But this is a low level and very common operation. I would like to add a second error event to the error log which indicates who was requesting the memory.
packet = (RcmClient_Packet*)Memory_alloc(NULL, size, sizeof(Ptr), eb);
if (Error_check(eb)) {
Error_raise(eb, RcmClient_E_packetAllocFailed, size, 0);
goto leave;
}
Is this safe to do, or must I call Error_init() before raising the second error?
Thanks
~ Ramsey