Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.github.steveash.bushwhacker.rules;
 
 

Author(s):
Steve Ash
public class ActionMaker {
  public static Function<Throwable,ThrowablemakeAddHint(final String hint) {
    return new Function<ThrowableThrowable>() {
      @Override
      public Throwable apply(Throwable input) {
        MessageEnricher.enrich(inputhint);
        return input;
      }
    };
  }
  public static Function<ThrowableThrowablemakeReplace(final String newMessage) {
    return new Function<ThrowableThrowable>() {
      @Override
      public Throwable apply(Throwable input) {
        MessageEnricher.replace(inputnewMessage);
        return input;
      }
    };
  }
  public static Function<Throwable,ThrowablemakeLog() {
    return new Function<ThrowableThrowable>() {
      @Override
      public Throwable apply(Throwable input) {
        ..warn("Bushwhacker detected " + input.getClass().getSimpleName() + " and "
                             + "is just logging it here and then letting the program handle it. "
                             + input.getMessage(), input);
        return input;
      }
    };
  }
New to GrepCode? Check out our FAQ X