Next: , Previous: , Up: GNU LibreDWG   [Contents][Index]


8 Errors

LibreDWG is mostly a library, and as such collects error codes from the highest level function down to the lowest level functions. The error codes are sorted by severity, and only if the error exceeds DWG_ERR_CRITICAL, i.e. DWG_ERR_CLASSESNOTFOUND, processing is stopped.

All error bitmasks are collected during read or write and returned at the end.

DWG_ERR_WRONGCRC

1

DWG_ERR_NOTYETSUPPORTED

2

DWG_ERR_UNHANDLEDCLASS

4

DWG_ERR_INVALIDTYPE

8

DWG_ERR_INVALIDHANDLE

16

DWG_ERR_INVALIDEED

32

DWG_ERR_VALUEOUTOFBOUNDS

64

DWG_ERR_CLASSESNOTFOUND

128 = DWG_ERR_CRITICAL

DWG_ERR_SECTIONNOTFOUND

256

DWG_ERR_PAGENOTFOUND

512

DWG_ERR_INTERNALERROR

1024

DWG_ERR_INVALIDDWG

2048

DWG_ERR_IOERROR

4096

DWG_ERR_OUTOFMEM

8192

Additionally, verbose warning and error messages are printed to stderr.

Unhandled class and Invalid type errors of objects are not severe. A DWG format can store a serialization of many third party classes and objects, and thus we will never be able read all possible types. Unknown types are just stored as binary blob without any DXF codes.