00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef RESOURCEPOOL_ORACLE_ORACLEEXCEPTIONFACTORY_HH
00027 #define RESOURCEPOOL_ORACLE_ORACLEEXCEPTIONFACTORY_HH
00028
00029 #ifndef RESOURCEPOOL_ORACLE_ORACLEEXCEPTION_HH
00030 #include "OracleException.hh"
00031 #endif
00032
00033 #ifndef RESOURCEPOOL_ORACLE_OCIHANDLE_HH
00034 #include "OCIHandle.hh"
00035 #endif
00036
00037 #include <sstream>
00038
00039 namespace fatalmind {
00040
00041 class OracleExceptionFactory {
00042 public:
00043
00044
00045
00046 static void throwit(const std::string& op
00047 , const std::string& fac
00048 , const int errorcode
00049 , const std::string& msg
00050 , const std::string& sqlstm
00051 );
00052 static void throwit(
00053 const std::string& op
00054 , const oracle::OCIEnvHandle& env
00055 , sword ret
00056 , const std::string& sqlstm
00057 );
00058 static void throwit(
00059 const std::string& op
00060 , const oracle::OCIErrorHandle& err
00061 , sword ret
00062 , const std::string& sqlstm
00063 );
00064 static void throwit(
00065 const std::string& op
00066 , const oracleHandles&
00067 , sword ret
00068 , const std::string& sqlstm
00069 );
00070
00071
00072
00073 static void throwit(const std::string& oper
00074 , const dvoid* errhp
00075 , sword ret
00076 , ub4 type
00077 , const std::string& sqlstm
00078 );
00079
00087 OracleExceptionFactory(
00088 const std::string& oper
00089 , const dvoid* errhp
00090 , sword ret
00091 , ub4 type
00092 , const std::string& sqlstm
00093 );
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103 void throwit();
00104
00105 private:
00106 std::string state;
00107 std::string msg;
00108 std::string sqlstm;
00109 int errorcode;
00110 };
00111
00112 }
00113
00114 #endif