Skip to content

Commit

Permalink
Improve error messages when parsing --failure-level parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
pasieronen authored and robertpanzer committed Sep 10, 2022
1 parent ca28b28 commit 4d5128e
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
package org.asciidoctor.jruby.cli;

import com.beust.jcommander.IStringConverter;
import org.asciidoctor.SafeMode;
import com.beust.jcommander.converters.EnumConverter;
import org.asciidoctor.log.Severity;

public class SeverityConverter implements IStringConverter<Severity> {
public class SeverityConverter extends EnumConverter<Severity> {

public SeverityConverter() {
super("--failure-level", Severity.class);
}

@Override
public Severity convert(String argument) { return Severity.valueOf(argument.toUpperCase()); }
public Severity convert(String argument) {
return super.convert(argument.toUpperCase());
}

}

0 comments on commit 4d5128e

Please sign in to comment.