List of usage examples for com.google.common.css.compiler.ast GssFunctionException GssFunctionException
public GssFunctionException(String message, Throwable e)
From source file:com.google.gwt.resources.gss.ResourceUrlFunction.java
private void assertMethodIsValidResource(SourceCodeLocation location, List<String> pathElements, ErrorManager errorManager) throws GssFunctionException { JType methodType;/*from w w w . j av a2 s .c o m*/ try { methodType = ResourceGeneratorUtil.getMethodByPath(context.getClientBundleType(), pathElements, null) .getReturnType(); } catch (NotFoundException e) { String message = e.getMessage(); errorManager.report(new GssError(message, location)); throw new GssFunctionException(message, e); } if (!dataResourceType.isAssignableFrom((JClassType) methodType) && !imageResourceType.isAssignableFrom((JClassType) methodType)) { String message = "Invalid method type for url substitution: " + methodType + ". " + "Only DataResource and ImageResource are supported."; errorManager.report(new GssError(message, location)); throw new GssFunctionException(message); } }