GTM_Errors_Warnings namespace

Declared in: GeoTransformers.h

Recommended list of errors and warnings to be generated by a custom GeoTransformer module.

[C++]

namespace GTM_Errors_Warnings {

DWORD const err_unknown_class = 0x20000000// Unknown GeoTransformer class.

DWORD const err_wrong_version = 0x20000001// Unsupported version of requested GeoTransformer.

DWORD const wrn_miss_params = 0x20000002// Missing parameters in GeoTransformer definition.

/* TODO: if required, add here more init errors and warnings flags */

DWORD const err_data_general = 0x30000000// Cannot transform in this direction.

DWORD const err_data_invalid_in = 0x30000001// Invalid input data.

DWORD const err_data_invalid_out = 0x30000002// Invalid output data.

DWORD const err_data_type_in = 0x30000003// Unsupported input data type.

DWORD const err_data_type_out = 0x30000004// Unsupported output data type.

DWORD const err_data_types_size = 0x30000005// Input and output data types are incompatible.

DWORD const err_data_types_dif = 0x30000006// Input and output must have the same data type.

DWORD const err_data_pnts_dif = 0x30000007// Input and output arrays must have same size.

/* TODO: if required, add here more processing errors and warnings flags */

const char * const szGeoTransModule_errs_wrns[] = {

"Unknown GeoTransformer class.",

"Unsupported version of requested GeoTransformer.",

"Missing parameters in Geotransformer definition. Default values will be used!",

/* TODO: if required, add here more init errors and warnings descriptions */

"Cannot transform in this direction.",

"Invalid input data.",

"Invalid output data.",

"Unsupported input data type.",

"Unsupported output data type.",

"Input and output data types are incompatible.",

"Input and output must have the same data type.",

"Input and output arrays must have same size."

/* TODO: if required, add here more processing errors and warnings descriptions */

}; // list of errors and warnings descriptions generated by GeoTransModule

};

using namespace GTM_Errors_Warnings;

Constants

Following table defines recommended values for error and warning codes to be set by Instance_Create and Instance_TryReuseCached functions:

Constant

Value

Description

err_unknown_class

0x20000000

Unknown GeoTransformer class.

err_wrong_version

0x20000001

Unsupported version of requested GeoTransformer.

wrn_miss_params

0x20000002

Missing parameters in GeoTransformer definition. Default values will be used!

Following table defines recommended values for error and warning codes to be set by GeoTrans_FromGlobalDirection and GeoTrans_ToGlobalDirection functions:

Constant

Value

Description

err_data_general

0x30000000

Cannot transform in this direction.

err_data_invalid_in

0x30000001

Invalid input data.

err_data_invalid_out

0x30000002

Invalid output data.

err_data_type_in

0x30000003

Unsupported input data type.

err_data_type_out

0x30000004

Unsupported output data type.

err_data_types_size

0x30000005

Input and output data types are incompatible.

err_data_types_dif

0x30000006

Input and output must have the same data type.

err_data_pnts_dif

0x30000007

Input and output arrays must have same size.

szGeoTransModule_errs_wrns

List of error and warning descriptions generated by a custom GeoTransformer module. It can be used by Error_FormatMessage function to associate a description for each code.

Remarks

None of these error and warning codes listed above represent a requirement: could be removed; their names, values or descriptions may be changed. Are only suggested as a good starting point in reporting errors and warnings. For example, one could add a warning code for each node in the XML structure that defines the GeoTransformer type supported by one's custom module.

Requirements

Platform

32 bit Windows OS

Environment

ANSI C / C++ Standard compliant

Dependency

kernel32.dll

Reference

kernel32.lib

Include

windows.h

Example

For a detailed example using this namespace, please see Custom GeoTransformer VC++ Sample.

Related Topics

Referenced By: Instance_Create, Instance_Discard, GeoTrans_FromGlobalDirection, GeoTrans_ToGlobalDirection, Error_FormatMessage, Instance_TryReuseCached, Instance_Serialize, Instance_UnSerialize