Add no-deprecated to warnings due to dynamic exceptions.
[anna.git] / source / dbms / OutputBind.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/core/functions.hpp>
10 #include <anna/core/tracing/Logger.hpp>
11
12 #include <anna/dbms/LongBlock.hpp>
13 #include <anna/dbms/OutputBind.hpp>
14
15 using namespace anna;
16 using namespace std;
17
18 void dbms::OutputBind::write() const
19 throw(RuntimeException, dbms::DatabaseException) {
20   const dbms::Data& data = Bind::getData();
21
22   if(data.getType() != Data::Type::LongBlock) {
23     string msg("anna::dbms::OutputBind::write | ");
24     msg += data.asString();
25     msg += " | This method only can be called for anna::dbms::LongBlock types";
26     throw RuntimeException(msg, ANNA_FILE_LOCATION);
27   }
28
29   LOGDEBUG(
30     string msg("anna::dbms::OutputBind::write | ");
31     msg += data.asString();
32     Logger::debug(msg, ANNA_FILE_LOCATION);
33   );
34   do_write(reinterpret_cast <const dbms::LongBlock&>(data));
35 }
36
37