Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Deprecated/Error.old/ErrorTest.cpp File Reference

#include <j2k/Fred/Error/ErrorCode.hpp>

Go to the source code of this file.

Functions

ErrorCode doSomeJob (int i)
ErrorCode myFunc (void)
int main (void)


Function Documentation

ErrorCode doSomeJob int    i
 

Definition at line 5 of file ErrorTest.cpp.

Referenced by myFunc().

00007 {
00008 
00009   if (i == 0) {
00010 
00011     return MyError1;
00012 
00013   } else if (i > 10) {
00014 
00015     return MyError2;
00016 
00017   }
00018 
00019 
00020 
00021   // ...
00022 
00023 
00024 
00025   return Success;
00026 
00027 }

int main void   
 

Definition at line 63 of file ErrorTest.cpp.

00063                {
00064 
00065   return !(myFunc() == Success)
00066 
00067 }

ErrorCode myFunc void   
 

Definition at line 33 of file ErrorTest.cpp.

Referenced by main().

00035 {
00036 
00037   doSomeJob(0); // <-- return value not used
00038 
00039 
00040 
00041   ErrorCode err = doSomeJob(5);
00042 
00043   err = doSomeJob(15); // <-- previous value of err not tested
00044 
00045   if (err != Success) // <-- return value is tested
00046 
00047     return err;
00048 
00049   
00050 
00051   ... // some code
00052 
00053   
00054 
00055   return Success;
00056 
00057 }


Generated on Sun Oct 14 18:47:08 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001