vxwErr.h
资源名称:ixp425BSP.rar [点击查看]
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:1k
源码类别:
VxWorks
开发平台:
C/C++
- // VXWError/vxwErr.h - error handling class
- // Copyright 1995-1999 Wind River Systems, Inc.
- //
- // modification history
- // --------------------
- // 01c,08jun99,dgp doc: add descrip for correct refgen processing
- // 01b,23feb99,fle doc : made it refgen parsable
- // 01a,15jun95,srh written.
- //
- // DESCRIPTION
- // The `VXWError' class provides a generic error handling facility.
- //
- // INCLUDE FILE: vxwErr.h
- //
- // SEE ALSO: <VxWorks Programmer's Guide: C++ Development>
- //
- #ifndef vxwErr_h
- #define vxwErr_h
- #include "errnoLib.h"
- class VXWError
- {
- public:
- VXWError (const char *);
- VXWError (const int);
- VXWError (const VXWError &);
- virtual ~VXWError ();
- const char * why () const
- {
- return errorMessage_;
- }
- protected:
- VXWError ()
- {
- }
- void makeCopy (const char * s);
- const char * errorMessage_;
- };
- void vxwSetErrHandler (void (*)(const VXWError &));
- void vxwThrow (const VXWError & err);
- inline void vxwThrowErrno ()
- {
- vxwThrow (VXWError (errnoGet ()));
- }
- #endif /* #ifndef vxwErr_h */