get_Message Method

WRAPPER_API const BmgChar *get_Message() const

 

Description

The get_Message method returns a string that describes the ErrorCode.

 

Example

void GeoCalcException_getMessage(GEOCALCPBW_NAMESPACE::DataSource & data)

{

_towchar issuer("ThisIsNotAValidIssuer");

_towchar code("ThisIsNotAValidCode");

try

{

GEOCALCPBW_NAMESPACE::ProjectedCoordSys * cs = data.GetProjectedCoordSys(issuer, code);

}

catch(GEOCALCPBW_NAMESPACE::GeoCalcException & ex)

{

if(ex.get_ErrorCode() == GEOCALCPBW_NAMESPACE::GeoCalcException::Code::IdentifierNotFound)

{

CString description = "Invalid ProjectedCoordSys identifier: issuer=";

description += issuer;

description += ", code=";

description += code;

AfxMessageBox(description);

}

else

{

CString description;

description += "GeoCalcException:\n";

description += "Details: ";

description += ex.get_Details();

description += "\nFull Message: ";

description += ex.get_FullMessage();

description += "\nIs From Core: ";

if(ex.get_IsFromCore())

{

description += "true";

}

else

{

description += "false";

}

description += "\nLocation: ";

description += ex.get_Location();

description += "\nMessage: ";

description += ex.get_Message();

AfxMessageBox(description);

}

}

}