Permalink
Browse files

[bugfix] getActiveBrokers() can throw a RunTimeException; handle this…

… situation, return value anyway
  • Loading branch information...
1 parent 0b27487 commit f1d78220c8bb5205758b35c6052a6a1833f7430d @dizzzz dizzzz committed Sep 25, 2013
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/org/exist/xquery/Profiler.java
@@ -139,9 +139,13 @@ public final boolean isEnabled() {
}
public final boolean isLogEnabled() {
- final DBBroker broker = db.getActiveBroker();
- final Boolean globalProp = (Boolean) broker.getConfiguration().getProperty(CONFIG_PROPERTY_TRACELOG);
- return logEnabled || (globalProp != null && globalProp.booleanValue());
+ try {
+ final DBBroker broker = db.getActiveBroker();
+ final Boolean globalProp = (Boolean) broker.getConfiguration().getProperty(CONFIG_PROPERTY_TRACELOG);
+ return logEnabled || (globalProp != null && globalProp.booleanValue());
+ } catch (Throwable t) {
+ return logEnabled;
+ }
}
public final void setLogEnabled(boolean enabled) {

0 comments on commit f1d7822

Please sign in to comment.