WRAPPER_API bool get_IsFromCore() const
The get_IsFromCore method indicates if this GeoCalcException originated in the GeoCalc core or in a GeoCalc wrapper.
void GeoCalcException_getIsFromCore(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);
}
}
}