class Cqpid::LoggerOutput
Public Instance Methods
log(*args)
click to toggle source
SWIGINTERN VALUE _wrap_LoggerOutput_log(int argc, VALUE *argv, VALUE self) { qpid::messaging::LoggerOutput *arg1 = (qpid::messaging::LoggerOutput *) 0 ; qpid::messaging::Level arg2 ; bool arg3 ; char *arg4 = (char *) 0 ; int arg5 ; char *arg6 = (char *) 0 ; std::string *arg7 = 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; bool val3 ; int ecode3 = 0 ; int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; int val5 ; int ecode5 = 0 ; int res6 ; char *buf6 = 0 ; int alloc6 = 0 ; int res7 = SWIG_OLDOBJ ; if ((argc < 6) || (argc > 6)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc); SWIG_fail; } res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_qpid__messaging__LoggerOutput, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "qpid::messaging::LoggerOutput *","log", 1, self )); } arg1 = reinterpret_cast< qpid::messaging::LoggerOutput * >(argp1); ecode2 = SWIG_AsVal_int(argv[0], &val2); if (!SWIG_IsOK(ecode2)) { SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "qpid::messaging::Level","log", 2, argv[0] )); } arg2 = static_cast< qpid::messaging::Level >(val2); ecode3 = SWIG_AsVal_bool(argv[1], &val3); if (!SWIG_IsOK(ecode3)) { SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "bool","log", 3, argv[1] )); } arg3 = static_cast< bool >(val3); res4 = SWIG_AsCharPtrAndSize(argv[2], &buf4, NULL, &alloc4); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","log", 4, argv[2] )); } arg4 = reinterpret_cast< char * >(buf4); ecode5 = SWIG_AsVal_int(argv[3], &val5); if (!SWIG_IsOK(ecode5)) { SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "int","log", 5, argv[3] )); } arg5 = static_cast< int >(val5); res6 = SWIG_AsCharPtrAndSize(argv[4], &buf6, NULL, &alloc6); if (!SWIG_IsOK(res6)) { SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "char const *","log", 6, argv[4] )); } arg6 = reinterpret_cast< char * >(buf6); { std::string *ptr = (std::string *)0; res7 = SWIG_AsPtr_std_string(argv[5], &ptr); if (!SWIG_IsOK(res7)) { SWIG_exception_fail(SWIG_ArgError(res7), Ruby_Format_TypeError( "", "std::string const &","log", 7, argv[5] )); } if (!ptr) { SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","log", 7, argv[5])); } arg7 = ptr; } { static VALUE eMessagingError = rb_define_class("MessagingError", rb_eStandardError); try { (arg1)->log(arg2,arg3,(char const *)arg4,arg5,(char const *)arg6,(std::string const &)*arg7); } catch(qpid::messaging::ConnectionError& error) { static VALUE merror = rb_define_class("ConnectionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransportFailure& error) { static VALUE merror = rb_define_class("TransportFailure", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionAborted& error) { static VALUE merror = rb_define_class("TransactionAborted", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionUnknown& error) { static VALUE merror = rb_define_class("TransactionUnknown", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TransactionError& error) { static VALUE merror = rb_define_class("TransactionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::UnauthorizedAccess& error) { static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SessionError& error) { static VALUE merror = rb_define_class("SessionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::TargetCapacityExceeded& error) { static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SendError& error) { static VALUE merror = rb_define_class("SendError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::SenderError& error) { static VALUE merror = rb_define_class("SenderError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NoMessageAvailable& error) { static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::FetchError& error) { static VALUE merror = rb_define_class("FetchError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ReceiverError& error) { static VALUE merror = rb_define_class("ReceiverError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::InvalidOptionString& error) { static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::KeyError& error) { static VALUE merror = rb_define_class("KeyError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AssertionFailed& error) { static VALUE merror = rb_define_class("AssertionFailed", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::NotFound& error) { static VALUE merror = rb_define_class("NotFound", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::ResolutionError& error) { static VALUE merror = rb_define_class("ResolutionError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MalformedAddress& error) { static VALUE merror = rb_define_class("MalformedAddress", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::AddressError& error) { static VALUE merror = rb_define_class("AddressError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::LinkError& error) { static VALUE merror = rb_define_class("LinkError", eMessagingError); rb_raise(merror, "%s", error.what()); } catch(qpid::messaging::MessagingException& error) { rb_raise(eMessagingError, "%s", error.what()); } } if (alloc4 == SWIG_NEWOBJ) delete[] buf4; if (alloc6 == SWIG_NEWOBJ) delete[] buf6; if (SWIG_IsNewObj(res7)) delete arg7; return Qnil; fail: if (alloc4 == SWIG_NEWOBJ) delete[] buf4; if (alloc6 == SWIG_NEWOBJ) delete[] buf6; if (SWIG_IsNewObj(res7)) delete arg7; return Qnil; }