[fdo-dev] Exception messages
Donald Cameron
donald.cameron at autodesk.com
Mon Nov 6 11:58:04 EST 2006
Hi Jack,
What does the %N on the end of the NLSPATH do?
Don
-----Original Message-----
From: Jack Lee
Sent: Monday, November 06, 2006 10:31 AM
To: dev at fdo.osgeo.org
Subject: RE: [fdo-dev] Exception messages
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
---------------------------------------------------------------------
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