1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>paintlib: plexcept.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Compound Members</a></div>
<h1>plexcept.h</h1><div class="fragment"><pre>00001 <span class="comment">/*</span>
00002 <span class="comment">/--------------------------------------------------------------------</span>
00003 <span class="comment">|</span>
00004 <span class="comment">| $Id: plexcept_8h-source.html,v 1.4 2004/09/15 15:26:29 uzadow Exp $</span>
00005 <span class="comment">|</span>
00006 <span class="comment">| Copyright (c) 1996-2002 Ulrich von Zadow</span>
00007 <span class="comment">|</span>
00008 <span class="comment">\--------------------------------------------------------------------</span>
00009 <span class="comment">*/</span>
00010
00011 <span class="preprocessor">#ifndef INCL_PLEXCEPT</span>
00012 <span class="preprocessor"></span><span class="preprocessor">#define INCL_PLEXCEPT</span>
00013 <span class="preprocessor"></span>
00014 <span class="preprocessor">#ifndef AFX_PLOBJECT_H__E40881E3_C809_11D3_97BC_0050046F615E__INCLUDED_</span>
00015 <span class="preprocessor"></span><span class="preprocessor">#include "plobject.h"</span>
00016 <span class="preprocessor">#endif</span>
00017 <span class="preprocessor"></span>
00018
00019 <span class="comment">// Error codes</span>
00020 <span class="preprocessor">#define PL_ERROK 0 // No error</span>
00021 <span class="preprocessor"></span><span class="preprocessor">#define PL_ERRWRONG_SIGNATURE 1 // Expected file signature</span>
00022 <span class="preprocessor"></span> <span class="comment">// not found.</span>
00023 <span class="preprocessor">#define PL_ERRFORMAT_UNKNOWN 2 // Sanity check failed.</span>
00024 <span class="preprocessor"></span>
00025 <span class="preprocessor">#define PL_ERRPATH_NOT_FOUND 3 // <--</span>
00026 <span class="preprocessor"></span><span class="preprocessor">#define PL_ERRFILE_NOT_FOUND 4 // <-- Problems with the file</span>
00027 <span class="preprocessor"></span><span class="preprocessor">#define PL_ERRACCESS_DENIED 5 // <-- system.</span>
00028 <span class="preprocessor"></span>
00029 <span class="preprocessor">#define PL_ERRFORMAT_NOT_SUPPORTED 6 // Known but unsupported</span>
00030 <span class="preprocessor"></span> <span class="comment">// format.</span>
00031 <span class="preprocessor">#define PL_ERRINTERNAL 7 // Internal error of some sort.</span>
00032 <span class="preprocessor"></span><span class="preprocessor">#define PL_ERRUNKNOWN_FILE_TYPE 8 // Couldn't recognize the</span>
00033 <span class="preprocessor"></span> <span class="comment">// file type.</span>
00034 <span class="preprocessor">#define PL_ERRDIB_TOO_LARGE 9 // Maximum size for 1 bmp was</span>
00035 <span class="preprocessor"></span> <span class="comment">// exceeded.</span>
00036 <span class="preprocessor">#define PL_ERRNO_MEMORY 10 // Out of memory.</span>
00037 <span class="preprocessor"></span><span class="preprocessor">#define PL_ERREND_OF_FILE 11 // End of file reached before</span>
00038 <span class="preprocessor"></span> <span class="comment">// end of image.</span>
00039 <span class="preprocessor">#define PL_ERRFORMAT_NOT_COMPILED 12 // Support for this file format</span>
00040 <span class="preprocessor"></span> <span class="comment">// was #ifdef'ed out.</span>
00041 <span class="preprocessor">#define PL_ERRURL_SOURCE 13 // Curl returned error.</span>
00042 <span class="preprocessor"></span><span class="preprocessor">#define PL_ERRBAD_EXIF 14 //</span>
00043 <span class="preprocessor"></span>
00044 <span class="comment"></span>
00045 <span class="comment">//! An object of this class is thrown by other classes when an error</span>
00046 <span class="comment">//! occurs. It contains an error code and a string describing the</span>
00047 <span class="comment">//! error. The error code is meant to be used internally in the</span>
00048 <span class="comment">//! program; the descriptive string can be output to the user. Error</span>
00049 <span class="comment">//! codes and strings do not correspond 1:1. The strings are more</span>
00050 <span class="comment">//! precise.</span>
<a name="l00051"></a><a class="code" href="classPLTextException.html">00051</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="classPLTextException.html">PLTextException</a> : <span class="keyword">public</span> PLObject
00052 {
00053
00054 <span class="keyword">public</span>:<span class="comment"></span>
00055 <span class="comment"> //! Creates an exception.</span>
00056 <span class="comment"></span> <a class="code" href="classPLTextException.html">PLTextException</a>
00057 ( <span class="keywordtype">int</span> Code,
00058 <span class="keyword">const</span> <span class="keywordtype">char</span> * pszErr
00059 );
00060 <span class="comment"></span>
00061 <span class="comment"> //! Creates an exception.</span>
00062 <span class="comment"></span> <a class="code" href="classPLTextException.html">PLTextException</a>
00063 ( <span class="keywordtype">int</span> Code,
00064 <span class="keywordtype">int</span> MinorCode,
00065 <span class="keyword">const</span> <span class="keywordtype">char</span> * pszErr
00066 );
00067 <span class="comment"></span>
00068 <span class="comment"> //! Copy constructor.</span>
00069 <span class="comment"></span> <a class="code" href="classPLTextException.html">PLTextException</a>
00070 ( <span class="keyword">const</span> <a class="code" href="classPLTextException.html">PLTextException</a>& ex
00071 );
00072 <span class="comment"></span>
00073 <span class="comment"> //! Destroys an exception</span>
00074 <span class="comment"></span> <span class="keyword">virtual</span> ~<a class="code" href="classPLTextException.html">PLTextException</a>
00075 ();
00076 <span class="comment"></span>
00077 <span class="comment"> //! Returns the code of the error that caused the exception. Valid</span>
00078 <span class="comment"> //! error codes are:</span>
00079 <span class="comment"> //!</span>
00080 <span class="comment"> //! PL_ERRWRONG_SIGNATURE (1): Expected file signature not found.</span>
00081 <span class="comment"> //!</span>
00082 <span class="comment"> //! PL_ERRFORMAT_UNKNOWN (2): Unexpected data encountered. This</span>
00083 <span class="comment"> //! probably indicates a corrupt file or an unknown file</span>
00084 <span class="comment"> //! sub-format.</span>
00085 <span class="comment"> //!</span>
00086 <span class="comment"> //! PL_ERRPATH_NOT_FOUND (3), PL_ERRFILE_NOT_FOUND (4),</span>
00087 <span class="comment"> //! PL_ERRACCESS_DENIED (5): Problems with the file system.</span>
00088 <span class="comment"> //!</span>
00089 <span class="comment"> //! PL_ERRFORMAT_NOT_SUPPORTED (6): Known but unsupported format.</span>
00090 <span class="comment"> //!</span>
00091 <span class="comment"> //! PL_ERRINTERNAL (7): Kaputt. Tell me about it.</span>
00092 <span class="comment"> //!</span>
00093 <span class="comment"> //! PL_ERRUNKNOWN_FILE_TYPE (8): Couldn't recognize the file type.</span>
00094 <span class="comment"> //!</span>
00095 <span class="comment"> //! PL_ERRDIB_TOO_LARGE (9): Maximum size for 1 bmp was exceeded.</span>
00096 <span class="comment"> //! (See MAX_BITMAP_SIZE above for an explanation).</span>
00097 <span class="comment"> //!</span>
00098 <span class="comment"> //! PL_ERRNO_MEMORY (10): Out of memory.</span>
00099 <span class="comment"> //!</span>
00100 <span class="comment"> //! PL_ERREND_OF_FILE (11): End of file reached before end of image.</span>
00101 <span class="comment"> //!</span>
00102 <span class="comment"> //! PL_ERRFORMAT_NOT_COMPILED (12): Support for this file format</span>
00103 <span class="comment"> //! was #ifdef'ed out.</span>
00104 <span class="comment"> //!</span>
00105 <span class="comment"> //! PL_ERRURL_SOURCE (13): Curl returned error.</span>
00106 <span class="comment"> //!</span>
00107 <span class="comment"> //! PL_ERRBAD_EXIF (14): Error decoding EXIF data.</span>
00108 <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classPLTextException.html#a4">GetCode</a>
00109 ()
00110 <span class="keyword">const</span>;
00111 <span class="comment"></span>
00112 <span class="comment"> //! In case of PL_ERRURL_SOURCE, the actual curl error code (from curl.h) is</span>
00113 <span class="comment"> //! placed here.</span>
00114 <span class="comment"></span> <span class="keywordtype">int</span> <a class="code" href="classPLTextException.html#a5">GetMinorCode</a>
00115 ()
00116 <span class="keyword">const</span>;
00117 <span class="comment"></span>
00118 <span class="comment"> //! This operator allows the exception to be treated as a string</span>
00119 <span class="comment"> //! whenever needed. The string contains the error message.</span>
00120 <span class="comment"></span> <span class="keyword">virtual</span> <span class="keyword">operator</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *
00121 ()
00122 <span class="keyword">const</span>;
00123
00124 <span class="keyword">private</span>:
00125 <span class="keywordtype">int</span> m_Code;
00126 <span class="keywordtype">int</span> m_MinorCode;
00127 <span class="keywordtype">char</span> * m_pszErr;
00128 };
00129
00130 <span class="preprocessor">#endif</span>
00131 <span class="preprocessor"></span><span class="comment">/*</span>
00132 <span class="comment">/--------------------------------------------------------------------</span>
00133 <span class="comment">|</span>
00134 <span class="comment">| $Log: plexcept_8h-source.html,v $
00134 <span class="comment">| Revision 1.4 2004/09/15 15:26:29 uzadow
00134 <span class="comment">| Linux compatibility changes, doc update.
00134 <span class="comment">|</span>
00135 <span class="comment">| Revision 1.11 2004/09/11 12:41:35 uzadow</span>
00136 <span class="comment">| removed plstdpch.h</span>
00137 <span class="comment">|</span>
00138 <span class="comment">| Revision 1.10 2004/06/06 12:56:38 uzadow</span>
00139 <span class="comment">| Doxygenified documentation.</span>
00140 <span class="comment">|</span>
00141 <span class="comment">| Revision 1.9 2003/11/21 23:35:44 uzadow</span>
00142 <span class="comment">| Removed files built by the autotools.</span>
00143 <span class="comment">|</span>
00144 <span class="comment">| Revision 1.8 2003/08/03 12:03:20 uzadow</span>
00145 <span class="comment">| Added unicode support; fixed some header includes.</span>
00146 <span class="comment">|</span>
00147 <span class="comment">| Revision 1.7 2003/04/20 12:44:47 uzadow</span>
00148 <span class="comment">| Added EXIF documentation.</span>
00149 <span class="comment">|</span>
00150 <span class="comment">| Revision 1.6 2003/04/13 20:13:21 uzadow</span>
00151 <span class="comment">| Added counted pointer classes (windows ver.)</span>
00152 <span class="comment">|</span>
00153 <span class="comment">| Revision 1.5 2003/02/15 21:26:58 uzadow</span>
00154 <span class="comment">| Added win32 version of url data source.</span>
00155 <span class="comment">|</span>
00156 <span class="comment">| Revision 1.4 2002/11/18 14:44:46 uzadow</span>
00157 <span class="comment">| Added PNG compression support, fixed docs.</span>
00158 <span class="comment">|</span>
00159 <span class="comment">| Revision 1.3 2002/08/07 18:50:38 uzadow</span>
00160 <span class="comment">| More cygwin compatibility changes.</span>
00161 <span class="comment">|</span>
00162 <span class="comment">| Revision 1.2 2002/03/03 16:29:55 uzadow</span>
00163 <span class="comment">| Re-added BPPWanted.</span>
00164 <span class="comment">|</span>
00165 <span class="comment">| Revision 1.1 2001/09/16 19:03:22 uzadow</span>
00166 <span class="comment">| Added global name prefix PL, changed most filenames.</span>
00167 <span class="comment">|</span>
00168 <span class="comment">| Revision 1.4 2000/01/17 23:38:07 Ulrich von Zadow</span>
00169 <span class="comment">| MFC removal aftermath.</span>
00170 <span class="comment">|</span>
00171 <span class="comment">|</span>
00172 <span class="comment">\--------------------------------------------------------------------</span>
00173 <span class="comment">*/</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Sep 13 16:16:40 2004 for paintlib by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.2 </small></address>
</body>
</html>
|