Skip to content

Commit

Permalink
JlineCommandRegistry: added traces
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn committed Jun 9, 2020
1 parent 5ae969e commit 8618e47
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.regex.Pattern;

import org.jline.utils.AttributedString;
import org.jline.utils.Log;
import org.jline.builtins.Options;
import org.jline.builtins.Completers.AnyCompleter;
import org.jline.builtins.Completers.OptDesc;
Expand Down Expand Up @@ -45,7 +46,11 @@ public List<String> commandInfo(String command) {
} catch (HelpException e) {
return compileCommandInfo(e.getMessage());
} catch (Exception e) {

Log.info("Error while getting command info", e);
if (Log.isDebugEnabled()) {
e.printStackTrace();
}
return new ArrayList<>();
}
throw new IllegalArgumentException("JlineCommandRegistry.commandInfo() method must be overridden in class "
+ this.getClass().getCanonicalName());
Expand Down

0 comments on commit 8618e47

Please sign in to comment.