why DefaultSqlSession handler exception like this

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

why DefaultSqlSession handler exception like this

Nong Xiang
hi,all,

my question is:
in class org.apache.ibatis.session.defaults.DefaultSqlSession handle exception

public int update(String statement, Object parameter) {
  try {
    dirty = true;
    MappedStatement ms = configuration.getMappedStatement(statement);
    return executor.update(ms, wrapCollection(parameter));
  } catch (Exception e) {
    throw ExceptionFactory.wrapException("Error updating database.  Cause: " + e, e);
  } finally {
    ErrorContext.instance().reset();
  }
}

throw ExceptionFactory.wrapException("Error updating database.  Cause: " + e, e) this why not is 

throw ExceptionFactory.wrapException("Error updating database.  Cause: " + e.getMessage(), e). 

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: why DefaultSqlSession handler exception like this

Iwao AVE!

2017-12-06 11:02 GMT+09:00 Nong Xiang <[hidden email]>:
hi,all,

my question is:
in class org.apache.ibatis.session.defaults.DefaultSqlSession handle exception

public int update(String statement, Object parameter) {
  try {
    dirty = true;
    MappedStatement ms = configuration.getMappedStatement(statement);
    return executor.update(ms, wrapCollection(parameter));
  } catch (Exception e) {
    throw ExceptionFactory.wrapException("Error updating database.  Cause: " + e, e);
  } finally {
    ErrorContext.instance().reset();
  }
}

throw ExceptionFactory.wrapException("Error updating database.  Cause: " + e, e) this why not is 

throw ExceptionFactory.wrapException("Error updating database.  Cause: " + e.getMessage(), e). 

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.