forked from I2P_Developers/i2p.i2p
* Routerconsole: Replace wtf msg w/ something nicer
This commit is contained in:
@@ -9,7 +9,7 @@ class ContextHelper {
|
|||||||
public static RouterContext getContext(String contextId) {
|
public static RouterContext getContext(String contextId) {
|
||||||
List contexts = RouterContext.listContexts();
|
List contexts = RouterContext.listContexts();
|
||||||
if ( (contexts == null) || (contexts.size() <= 0) )
|
if ( (contexts == null) || (contexts.size() <= 0) )
|
||||||
throw new IllegalStateException("No contexts? wtf");
|
throw new IllegalStateException("No contexts. This is usually because the router is either starting up or shutting down.");
|
||||||
if ( (contextId == null) || (contextId.trim().length() <= 0) )
|
if ( (contextId == null) || (contextId.trim().length() <= 0) )
|
||||||
return (RouterContext)contexts.get(0);
|
return (RouterContext)contexts.get(0);
|
||||||
for (int i = 0; i < contexts.size(); i++) {
|
for (int i = 0; i < contexts.size(); i++) {
|
||||||
@@ -22,4 +22,4 @@ class ContextHelper {
|
|||||||
// not found, so just give them the first we can find
|
// not found, so just give them the first we can find
|
||||||
return (RouterContext)contexts.get(0);
|
return (RouterContext)contexts.get(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user