Diff for /parser3/src/include/pa_sql_connection.h between versions 1.44 and 1.45

version 1.44, 2017/02/07 22:00:36 version 1.45, 2019/09/11 15:26:09
Line 64  public: Line 64  public:
                 one can simply 'throw' from dynamic library.                  one can simply 'throw' from dynamic library.
                 [sad story: one can not longjump/throw due to some bug in gcc as of 3.2.1 version]                  [sad story: one can not longjump/throw due to some bug in gcc as of 3.2.1 version]
         */          */
         override void _throw(const SQL_Error& aexception) {           override void _throw(const SQL_Error& aexception) {
                 // converting SQL_exception to parser Exception                  // converting SQL_exception to parser Exception
                 // hiding passwords and addresses from accidental show [imagine user forgot @exception]                  // hiding passwords and addresses from accidental show [imagine user forgot @exception]
 #ifdef PA_WITH_SJLJ_EXCEPTIONS  #ifdef PA_WITH_SJLJ_EXCEPTIONS
Line 72  public: Line 72  public:
 #else  #else
                 fexception=                  fexception=
 #endif  #endif
                 Exception(aexception.type(),                   Exception(aexception.type() ? aexception.type() : "sql.connect", &url_without_login(), aexception.comment());
                                 &url_without_login(),  
                                 aexception.comment());   
   
 #ifndef PA_WITH_SJLJ_EXCEPTIONS  #ifndef PA_WITH_SJLJ_EXCEPTIONS
                 longjmp(mark, 1);                  longjmp(mark, 1);
 #endif  #endif
         }          }
   
         virtual void propagate_exception() {          virtual void propagate_exception() {
 #ifndef PA_WITH_SJLJ_EXCEPTIONS  #ifndef PA_WITH_SJLJ_EXCEPTIONS
                 throw fexception;                  throw fexception;
Line 148  public: Line 147  public:
                 const String& source) {                  const String& source) {
                 try {                  try {
                         SQL_CONNECTION_SERVICED_FUNC_GUARDED(                          SQL_CONNECTION_SERVICED_FUNC_GUARDED(
                                 fdriver.query(fconnection,                                   fdriver.query(fconnection, statement, placeholders_count, placeholders, offset, limit, handlers)
                                         statement,                           );
                                         placeholders_count, placeholders,  
                                         offset, limit,   
                                         handlers)  
                         );        
                 } catch(const Exception& e) { // query problem                  } catch(const Exception& e) { // query problem
                         if(strcmp(e.type(), "sql.connect")==0) { // if it is _throw exception,                           if(strcmp(e.type(), "sql.connect")==0) { // if it is _throw exception, 
                                 // give more specific source [were url]                                  // show query instead of connect string
                                 throw Exception("sql.execute",                                  throw Exception("sql.execute", &source, "%s", e.comment());
                                         &source,   
                                         "%s", e.comment());  
                         } else                          } else
                                 rethrow;                                  rethrow;
                 }                  }

Removed from v.1.44  
changed lines
  Added in v.1.45


E-mail: