| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | OCL IException Classes |
Hallo Peter!
Antwort auf eine Message von Peter Garner an All:
PG> Hi all, PG> Location information does not get printed no
matter what. I am sure
PG> I am missing something in the documentation, but I cannot seem to get
PG> Location information from the caught object.
PG> Secondly running this program compiled for use with the C/C++
PG> Runtime DLLs on our system produces the output :
PG> IException Caught!
PG> Exception Type : IAccessError, Error ID = 1
PG> MAIN EXCEPTION
a) definitly, according to your source, THIS (and nothing else!) is the
expected output of your program!!!
b) the additional exception THROW information, is normally displayed to
the location specified by
ICLUI TRACETO.
eq: SET ICLUI TRACETO=pmque
or SET ICLUI TRACETO=stdout
this happens correctly in the version of your code with dynamic bound CRTL/OCL.
c) it appears as an bug to me, that the information is displayed to screen
and NOT to the ICLUI TRACETO location in the static bound OCL version. (I;m
at CTC5 CTO3 level)
d) it IS a bug, that you need to include istring.hpp. but here i can
explain the reason. most of the OCL header files include ibase.hpp and
ibase.hpp contain a #pragma libary(libName) statement. so, when you include
the header file, the compiler puts an required libary record into the
object file and so the linker knows what libarys have to be linked into the
binary. but IBM does not inlcude ibase.hpp in ALL files. so, it is just in
some files. eq. in istring. but NOT in the iexception files. thats why the
linker knows what he has to bind when you link in istring, but now, when
you JUST link iexcept*. It would be enough for you to link in ibase.hpp.
(
PG> IAccessError exception thrown.
PG> Location information is unavailable.
PG> Error Id is 1
PG> Error Code group is IBM Class Library
PG> Exception text is:
i would not expect to see this on the screen!! just assume your program is
throwing an expcetion sometime, catching the exception and everything is ok
then and continues to work - except you customers see the above lines on
the screen ! crazy!
PS: workaround to NEVER see the above lines (which is the correct behaviour);
a) add #include
b) add as first line in your code:
ITrace::isTraceEnabled();
this is a static function in itrace (which checks if traces are enabled).
implemented in itrace.inl:
inline IBase::Boolean ITrace::isTraceEnabled()
{
return (ITrace::iClState & ITrace::on);
}
so, the only effect is, that ITrace is referenced.
Servus, Mario!
--- FleetStreet 1.18 PR#2
* Origin: LC/32 Development Team, KirchnerSoft, Vienna, Austria (2:310/14.11)SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934 SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1 @PATH: 310/14 1 24/999 888 396/1 270/101 712/515 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.