dcerror.h

00001 /*
00002  *
00003  *  Copyright (C) 1994-2005, OFFIS
00004  *
00005  *  This software and supporting documentation were developed by
00006  *
00007  *    Kuratorium OFFIS e.V.
00008  *    Healthcare Information and Communication Systems
00009  *    Escherweg 2
00010  *    D-26121 Oldenburg, Germany
00011  *
00012  *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
00013  *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
00014  *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
00015  *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
00016  *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
00017  *
00018  *  Module:  dcmdata
00019  *
00020  *  Author:  Andrew Hewett
00021  *
00022  *  Purpose: Error handling, codes and strings
00023  *
00024  *  Last Update:      $Author: meichel $
00025  *  Update Date:      $Date: 2005/12/08 16:28:12 $
00026  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmdata/include/dcmtk/dcmdata/dcerror.h,v $
00027  *  CVS/RCS Revision: $Revision: 1.20 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 #ifndef DCERROR_H
00035 #define DCERROR_H
00036 
00037 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00038 #include "dcmtk/ofstd/ofcond.h"      /* for OFCondition */
00039 
00040 /*
00041  *  dcmtk module numbers for modules which create their own error codes.
00042  *  Module numbers > 1023 are reserved for user code.
00043  */
00044 
00045 const unsigned short OFM_dcmdata  =  1;
00046 const unsigned short OFM_ctndisp  =  2;
00047 const unsigned short OFM_dcmimgle =  3;
00048 const unsigned short OFM_dcmimage =  4;
00049 const unsigned short OFM_dcmjpeg  =  5;
00050 const unsigned short OFM_dcmnet   =  6;
00051 const unsigned short OFM_dcmprint =  7;
00052 const unsigned short OFM_dcmpstat =  8;
00053 const unsigned short OFM_dcmsign  =  9;
00054 const unsigned short OFM_dcmsr    = 10;
00055 const unsigned short OFM_dcmtls   = 11;
00056 const unsigned short OFM_imagectn = 12;
00057 const unsigned short OFM_wlistctn = 13;
00058 const unsigned short OFM_dcmwlm   = 14;
00059 const unsigned short OFM_dcmpps   = 15;
00060 const unsigned short OFM_dcmdbsup = 16;
00061 const unsigned short OFM_dcmppswm = 17;
00062 const unsigned short OFM_dcmjp2k  = 18;
00063 
00064 
00065 // condition constants
00066 extern const OFCondition EC_InvalidTag;
00067 extern const OFCondition EC_TagNotFound;
00068 extern const OFCondition EC_InvalidVR;
00069 extern const OFCondition EC_InvalidStream;
00070 extern const OFCondition EC_EndOfStream;
00071 extern const OFCondition EC_CorruptedData;
00072 extern const OFCondition EC_IllegalCall;
00073 extern const OFCondition EC_SequEnd;
00074 extern const OFCondition EC_DoubledTag;
00075 extern const OFCondition EC_StreamNotifyClient;
00076 extern const OFCondition EC_WrongStreamMode;
00077 extern const OFCondition EC_ItemEnd;
00078 extern const OFCondition EC_RepresentationNotFound;
00079 extern const OFCondition EC_CannotChangeRepresentation;
00080 extern const OFCondition EC_UnsupportedEncoding;
00081 extern const OFCondition EC_PutbackFailed;
00082 extern const OFCondition EC_DoubleCompressionFilters;
00083 extern const OFCondition EC_ApplicationProfileViolated;
00084 
00085 
00086 #ifndef OFCONDITION_STRICT_MODE
00087 
00088 // for backward compatibility with existing software
00089 typedef OFCondition E_Condition;
00090 
00094 extern const char *dcmErrorConditionToString(OFCondition cond);
00095 
00096 #endif
00097 
00098 
00099 #endif /* !DCERROR_H */
00100 
00101 /*
00102 ** CVS/RCS Log:
00103 ** $Log: dcerror.h,v $
00104 ** Revision 1.20  2005/12/08 16:28:12  meichel
00105 ** Changed include path schema for all DCMTK header files
00106 **
00107 ** Revision 1.19  2004/08/24 14:53:15  meichel
00108 ** Added module number for future dcmjp2k module
00109 **
00110 ** Revision 1.18  2002/12/06 12:18:27  joergr
00111 ** Added new error status "EC_ApplicationProfileViolated".
00112 **
00113 ** Revision 1.17  2002/08/27 16:55:32  meichel
00114 ** Initial release of new DICOM I/O stream classes that add support for stream
00115 **   compression (deflated little endian explicit VR transfer syntax)
00116 **
00117 ** Revision 1.16  2002/08/12 09:56:59  wilkens
00118 ** Added module number (for error codes) for new module dcmppswm.
00119 **
00120 ** Revision 1.15  2002/05/28 08:44:21  wilkens
00121 ** Added module number for new module dcmdbsup.
00122 **
00123 ** Revision 1.14  2002/04/18 14:47:22  wilkens
00124 ** Inserted a new dcmtk module number for module mpps.
00125 **
00126 ** Revision 1.13  2002/01/08 17:53:30  joergr
00127 ** Added new module "dcmwlm".
00128 **
00129 ** Revision 1.12  2001/11/19 12:44:50  joergr
00130 ** Added dcmimage to list of modules.
00131 **
00132 ** Revision 1.11  2001/10/12 10:42:28  meichel
00133 ** Introduced conditional define OFCONDITION_STRICT_MODE in which the
00134 **   compatibility options related to the transition to OFCondition are disabled:
00135 **   No OFCondition default constructor, no typedefs for E_Condition, CONDITION,
00136 **   no macros for SUCCESS and condition aliases.
00137 **
00138 ** Revision 1.10  2001/09/25 17:22:22  meichel
00139 ** Enabled E_Condition and dcmErrorConditionToString() for backward
00140 **   compatibility with existing code.
00141 **
00142 ** Revision 1.9  2001/09/25 17:19:26  meichel
00143 ** Adapted dcmdata to class OFCondition
00144 **
00145 ** Revision 1.8  2001/06/01 15:48:39  meichel
00146 ** Updated copyright header
00147 **
00148 ** Revision 1.7  2000/03/08 16:26:14  meichel
00149 ** Updated copyright header.
00150 **
00151 ** Revision 1.6  1999/03/31 09:24:38  meichel
00152 ** Updated copyright header in module dcmdata
00153 **
00154 ** Revision 1.5  1997/07/21 08:15:10  andreas
00155 ** - New environment for encapsulated pixel representations. DcmPixelData
00156 **   can contain different representations and uses codecs to convert
00157 **   between them. Codecs are derived from the DcmCodec class. New error
00158 **   codes are introduced for handling of representations. New internal
00159 **   value representation (only for ident()) for PixelData
00160 **
00161 ** Revision 1.4  1997/05/22 16:55:02  andreas
00162 ** - Added new error code EC_NotImplemented
00163 **
00164 ** Revision 1.3  1996/01/29 13:38:12  andreas
00165 ** - new put method for every VR to put value as a string
00166 ** - better and unique print methods
00167 **
00168 ** Revision 1.2  1996/01/05 13:22:55  andreas
00169 ** - changed to support new streaming facilities
00170 ** - more cleanups
00171 ** - merged read / write methods for block and file transfer
00172 **
00173 ** Revision 1.1  1995/11/23 16:37:54  hewett
00174 ** Updated for loadable data dictionary + some cleanup (more to do).
00175 **
00176 */
00177 


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5