Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

cNSError.cc File Reference

#include <iostream>
#include <fstream>
#include <string>
#include <stdio.h>
#include <string.h>
#include "NSError.h"

Go to the source code of this file.

Functions

int test (int f)
int main (int argc, char *argv[])

Variables

Logger slog


Function Documentation

int main int  argc,
char *  argv[]
 

Definition at line 26 of file cNSError.cc.

References ef, and test().

00027 {
00028         int ef = 0;
00029 
00030         cout << "cNSError:\n";
00031         if (test(0) != 0) {
00032                 cout << "test1 failed\n";
00033                 ef++;
00034         }
00035         if (test(1) != -1) {
00036                 cout << "test1 failed\n";
00037                 ef++;
00038         }
00039 
00040         if (ef == 0) {
00041                 cout << "cNSError: all tests succeeded\n";
00042                 exit(0);
00043         } else {
00044                 cout << "cNSError: " << ef << " tests failed\n";
00045                 exit(-1);
00046         }
00047 }

int test int  f  ) 
 

Definition at line 14 of file cNSError.cc.

Referenced by main().

00015 {
00016         try {
00017                 throw NoSuchGroupError("no such group");
00018         } catch(Error & e) {
00019                 e.print();
00020                 if (f)
00021                         return -1;
00022         }
00023         return 0;
00024 }


Variable Documentation

Logger slog
 

Definition at line 12 of file cNSError.cc.


Generated on Sun Oct 24 21:08:19 2004 for NewsCache by doxygen 1.3.6-20040222