00001 #ifndef PSXTCINPUT_EXCEPTIONS_H
00002 #define PSXTCINPUT_EXCEPTIONS_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include <string>
00017 #include <cerrno>
00018 #include <boost/lexical_cast.hpp>
00019
00020
00021
00022
00023 #include "ErrSvc/Issue.h"
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 namespace PSXtcInput {
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 class Exception : public ErrSvc::Issue {
00051 public:
00052
00053
00054 Exception ( const ErrSvc::Context& ctx,
00055 const std::string& className,
00056 const std::string& what ) ;
00057
00058 };
00059
00060
00061 class EmptyFileList : public Exception {
00062 public:
00063
00064 EmptyFileList(const ErrSvc::Context& ctx)
00065 : Exception( ctx, "EmptyFileList", "No input file names specified" ) {}
00066
00067 };
00068
00069
00070 class IndexSeekFailed : public Exception {
00071 public:
00072
00073 IndexSeekFailed(const ErrSvc::Context& ctx)
00074 : Exception( ctx, "IndexseekFailed", "Indexing seek failed" ) {}
00075
00076 };
00077
00078
00079 class EmptyInput : public Exception {
00080 public:
00081
00082 EmptyInput(const ErrSvc::Context& ctx)
00083 : Exception( ctx, "EmptyInput", "XTC file(s) is empty" ) {}
00084
00085 };
00086
00087
00088 class UnexpectedInput : public Exception {
00089 public:
00090
00091 UnexpectedInput(const ErrSvc::Context& ctx)
00092 : Exception( ctx, "UnexpectedInput", "Number of datagrams received from source is not expected" ) {}
00093
00094 };
00095
00096
00097 class ExceptionErrno : public Exception {
00098 public:
00099
00100
00101 ExceptionErrno ( const ErrSvc::Context& ctx, const std::string& what ) ;
00102
00103 };
00104
00105 }
00106
00107 #endif // PSXTCINPUT_EXCEPTIONS_H