bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: C++ exceptions in persistent streams (finally)


From: erik_ohrnberger
Subject: RE: C++ exceptions in persistent streams (finally)
Date: Fri, 3 Feb 2006 16:21:23 -0500

> 
> The bottom line is that you can pretty much ignore any sort 
> of exception
> support in the persistent streams package.  From what I've 
> been able to find
> out, it will never throw any exceptions from the various read 
> and write
> methods.
> 
Let me re-phrase that.  I've never seen any ios::failure exceptions being
throw from the Engine routines, but then this is an issue with the libstdc++
implementation and not the persistent streams (but does anyone have a hint
on this?).  

Having gone and loked at the engine.cpp code, I see instances where they are
throwing const char* exceptions (?) i.e.: 

THROW("Cannot write to an input Engine"); (line 152) 
and 
THROW("Object Id should not be NULL when unpersisting to a reference");
(line 305)

Odd that in some instances, such as:
void Engine::read(BaseObject *&object) THROWS (Engine::Exception)

the exception throw is:
THROW (Exception(String("Unable to instantiate object of class
")+className));

Does this mean that there is an exception conversion taking place?

Also odd, is in some instances we have:
void Engine::readObject(BaseObject* object)

but yet:
THROW("Missing Start-of-Object marker");

Is the "THROWS" part of the method decl optional?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]