// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/exception/Bucket4jGeneralException.java
// public abstract class Bucket4jGeneralException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// }
// 
// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/exception/FilterKeyTypeDeprectatedException.java
// public class FilterKeyTypeDeprectatedException  extends Bucket4jGeneralException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// }
// 
// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/exception/FilterURLInvalidException.java
// public class FilterURLInvalidException extends Bucket4jGeneralException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	private final String filterRegex;
// 
// 	private final String description;
// 	
// 	public FilterURLInvalidException(String filterRegex, String description) {
// 		this.filterRegex = filterRegex;
// 		this.description = description;
// 	}
// 
// 	public String getFilterRegex() {
// 		return filterRegex;
// 	}
// 
// 	public String getDescription() {
// 		return description;
// 	}
// 	
// }
// 
// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/exception/JCacheNotFoundException.java
// public class JCacheNotFoundException extends Bucket4jGeneralException {
// 
// 	private static final long serialVersionUID = 1L;
// 	
// 	private String cacheName;
// 	
// 	/**
// 	 * @param cacheName the missing cache key
// 	 */
// 	public JCacheNotFoundException(String cacheName) {
// 		this.cacheName = cacheName;
// 	}
// 
// 	public String getCacheName() {
// 		return cacheName;
// 	}
// 
// 	public void setCacheName(String cacheName) {
// 		this.cacheName = cacheName;
// 	}
// 
// }
// 
// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/exception/MissingKeyFilterExpressionException.java
// public class MissingKeyFilterExpressionException extends Bucket4jGeneralException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// }


import org.springframework.boot.diagnostics.AbstractFailureAnalyzer;
import org.springframework.boot.diagnostics.FailureAnalysis;
import com.giffing.bucket4j.spring.boot.starter.exception.Bucket4jGeneralException;
import com.giffing.bucket4j.spring.boot.starter.exception.FilterKeyTypeDeprectatedException;
import com.giffing.bucket4j.spring.boot.starter.exception.FilterURLInvalidException;
import com.giffing.bucket4j.spring.boot.starter.exception.JCacheNotFoundException;
import com.giffing.bucket4j.spring.boot.starter.exception.MissingKeyFilterExpressionException;

package com.giffing.bucket4j.spring.boot.starter.failureanalyzer;



/**
 * The failure analyzer is responsible to provide readable information of exception which
 * occur on startup. All exception based on the {@link Bucket4jGeneralException} are handled here.   
 */
public class Bucket4JAutoConfigFailureAnalyzer extends AbstractFailureAnalyzer<Bucket4jGeneralException>{

	public static String newline = System.getProperty("line.separator");
	
	@Override
	protected FailureAnalysis analyze(Throwable rootFailure, Bucket4jGeneralException cause) {
		String descriptionMessage = cause.getMessage();
		String actionMessage = cause.getMessage();
		

// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/exception/Bucket4jGeneralException.java
// public abstract class Bucket4jGeneralException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// }
// 
// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/exception/FilterKeyTypeDeprectatedException.java
// public class FilterKeyTypeDeprectatedException  extends Bucket4jGeneralException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// }
// 
// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/exception/FilterURLInvalidException.java
// public class FilterURLInvalidException extends Bucket4jGeneralException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	private final String filterRegex;
// 
// 	private final String description;
// 	
// 	public FilterURLInvalidException(String filterRegex, String description) {
// 		this.filterRegex = filterRegex;
// 		this.description = description;
// 	}
// 
// 	public String getFilterRegex() {
// 		return filterRegex;
// 	}
// 
// 	public String getDescription() {
// 		return description;
// 	}
// 	
// }
// 
// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/exception/JCacheNotFoundException.java
// public class JCacheNotFoundException extends Bucket4jGeneralException {
// 
// 	private static final long serialVersionUID = 1L;
// 	
// 	private String cacheName;
// 	
// 	/**
// 	 * @param cacheName the missing cache key
// 	 */
// 	public JCacheNotFoundException(String cacheName) {
// 		this.cacheName = cacheName;
// 	}
// 
// 	public String getCacheName() {
// 		return cacheName;
// 	}
// 
// 	public void setCacheName(String cacheName) {
// 		this.cacheName = cacheName;
// 	}
// 
// }
// 
// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/exception/MissingKeyFilterExpressionException.java
// public class MissingKeyFilterExpressionException extends Bucket4jGeneralException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// }


// Path: bucket4j-spring-boot-starter/src/main/java/com/giffing/bucket4j/spring/boot/starter/failureanalyzer/Bucket4JAutoConfigFailureAnalyzer.java
import org.springframework.boot.diagnostics.AbstractFailureAnalyzer;
import org.springframework.boot.diagnostics.FailureAnalysis;
import com.giffing.bucket4j.spring.boot.starter.exception.Bucket4jGeneralException;
import com.giffing.bucket4j.spring.boot.starter.exception.FilterKeyTypeDeprectatedException;
import com.giffing.bucket4j.spring.boot.starter.exception.FilterURLInvalidException;
import com.giffing.bucket4j.spring.boot.starter.exception.JCacheNotFoundException;
import com.giffing.bucket4j.spring.boot.starter.exception.MissingKeyFilterExpressionException;

package com.giffing.bucket4j.spring.boot.starter.failureanalyzer;



/**
 * The failure analyzer is responsible to provide readable information of exception which
 * occur on startup. All exception based on the {@link Bucket4jGeneralException} are handled here.   
 */
public class Bucket4JAutoConfigFailureAnalyzer extends AbstractFailureAnalyzer<Bucket4jGeneralException>{

	public static String newline = System.getProperty("line.separator");
	
	@Override
	protected FailureAnalysis analyze(Throwable rootFailure, Bucket4jGeneralException cause) {
		String descriptionMessage = cause.getMessage();
		String actionMessage = cause.getMessage();
		

		if(cause instanceof JCacheNotFoundException) {
