Changed LICENSE. Now referenced to web site and file on project root directory
[anna.git] / source / ldap / internal / Exception.cpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite                           //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7
8
9 #include <anna/ldap/internal/Exception.hpp>
10 #include <anna/ldap/Session.hpp>
11 #include <anna/ldap/ResultCode.hpp>
12
13 using namespace std;
14 using namespace anna;
15
16 ldap::Exception::Exception(const ldap::Session* session, const ldap::ResultCode& resultCode, const char *fromFile, const int fromLine) :
17   anna::Exception("", "anna::ldap::Exception", fromFile, fromLine) {
18   string msg = session->asString();
19   msg += " | ";
20   msg += resultCode.asString();
21   setText(msg.c_str());
22   anna::Exception::setErrorCode(resultCode.getValue());
23 }
24