state.getConfig().getErrorContext().setResource(url);
inputStream = Resources.getUrlAsStream(url);
} else {
throw new SqlMapException("The <sqlMap> element requires either a resource or a url attribute.");
}
new SqlMapParser(state).parse(inputStream);
} catch (Throwable e) {
String error = String.format("loading sql map resource[%s] error:%s.", resource, e.getMessage());
boolean throwException = ConfigurationHelper
.getBoolean(ConfigurationHelper.IBATIS_SQLMAP_THROW_EXCEPTION);
if (throwException) {