[fdo-dev] Exception messages

Jack Lee jack.lee at autodesk.com
Mon Nov 6 10:31:23 EST 2006


Hi Mateusz,

Currently, in Linux, you need to set 

NLSPATH=/usr/local/fdo-3.2.0/nls/%N

so that the message catalog is used.


If this is not set, the default string is used. The following is an
example of using the default string:

throw FdoSchemaException::Create(NlsMsgGet1(FDORDBMS_333, "Class '%1$ls'
not found", value->GetText()));



If the default string is not set, then only the constant is displayed.
The following is an example of not setting the default string.

FdoSchemaException* pNewException = FdoSchemaException::Create( 
	FdoSmError::NLSGetMessage(
		FDO_NLSID(FDOSM_221),
		pFeatSchema->GetName()
	),
	pException
);


-----Original Message-----
From: Mateusz Loskot [mailto:mateusz at loskot.net] 
Sent: Monday, November 06, 2006 9:40 AM
To: fdo-dev
Subject: [fdo-dev] Exception messages

Hi,

What can be reason that *some* IDs for exception message are
not resolved?

I have simple command line programs and I found that some of SchemaMgr
messages are not expanded, only IDs are displayed:

mloskot:~$ ./destroy_schema
Connected using: service=localhost;username=mloskot;datastore=fdo_test;
Connection state: Open
*** FDO Error:
 *** FDOSM_221

Other messages are displayed correctly:

mloskot:~$ ./delete_data
Connected using: service=localhost;username=mloskot;datastore=fdo_test;
Connection state: Open
*** FDO Error:
 *** Class 'TreeSchema:TreeClass' not found


Here is how I display top-level exception message:

catch(FdoException* ex)
{
   std::wcout << L"*** FDO Error:\n" << L" *** "
      << ex->GetExceptionMessage() << std::endl;
   ex->Release();
}

I'm almost sure it's not a problem with how the message is fetched and
displayed, but somewhere with compilation/installation.
Unfortunately, the NLS mechanism is still a black hole for me,
so I have no idea how it works.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at fdo.osgeo.org
For additional commands, e-mail: dev-help at fdo.osgeo.org






More information about the Fdo_dev mailing list