diff options
| author | Alan Conway <aconway@apache.org> | 2007-07-24 19:39:27 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-07-24 19:39:27 +0000 |
| commit | b7c528b027bff7585481c9ce3a01144040c6de5a (patch) | |
| tree | 6e4588e6b52a5a5457767ae9f8b59cddcfd28ef6 /cpp/src/qpid/QpidError.h | |
| parent | 0dcc71862cb48a79263a05facd4c42453441cbb5 (diff) | |
| download | qpid-python-b7c528b027bff7585481c9ce3a01144040c6de5a.tar.gz | |
* Summary:
- Wiring (declare/delete/bind) is replicated via AIS.
- TestOptions includes all logging options.
- Logger automatically parses env vars so logging can be enabled
for any program linked with libqpidcommon e.g. by setting QPID_TRACE=1.
* src/qpid/cluster/SessionManager.cpp: Handle frames from cluster
- Forward to BrokerAdapter for execution.
- Suppress responses in proxy.
* src/tests/TestOptions.h (Options): Logging options, --help option.
* src/qpid/client/ClientConnection.cpp: Removed log initialization.
Logs are initialized either in TestOptions or automatically from env vars,
e.g. QPID_TRACE,
* src/qpid/QpidError.h (class QpidError): Initialize Exception in
constructor so messages can be logged.
* src/qpid/framing/ChannelAdapter.h: Made send() virtual.
* src/tests/Cluster_child.cpp: UUID corrected.
* src/qpid/broker/Broker.cpp: Pass chains to updater by ref.
* src/qpid/Options.cpp (parse): Fix log settings from environment.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@559171 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/QpidError.h')
| -rw-r--r-- | cpp/src/qpid/QpidError.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cpp/src/qpid/QpidError.h b/cpp/src/qpid/QpidError.h index dea0902a0e..2ff6571365 100644 --- a/cpp/src/qpid/QpidError.h +++ b/cpp/src/qpid/QpidError.h @@ -48,16 +48,15 @@ class QpidError : public Exception template <class T> QpidError(int code_, const T& msg_, const SrcLine& loc_) throw() - : code(code_), loc(loc_), msg(boost::lexical_cast<std::string>(msg_)) - { init(); } + : Exception(message(code_, boost::lexical_cast<std::string>(msg_), loc_.file.c_str(), loc_.line)), + code(code_), loc(loc_), msg(boost::lexical_cast<std::string>(msg_)) {} ~QpidError() throw(); Exception::auto_ptr clone() const throw(); void throwSelf() const; - private: - - void init(); + /** Format message for exception. */ + static std::string message(int code, const std::string& msg, const char* file, int line); }; |
