@Override public String compile(String input, String location, boolean compress) throws LessException { try { return call(compile, new Object[]{input, location, compress}); } catch (Exception e){ throw new LessException(parseLessException(e)); } }
@SuppressWarnings("ThrowableResultOfMethodCallIgnored") private byte[] handleException(LessException e) { String filename = e.getFilename(); List<String> extractList = e.getExtract(); String extract = null; if (extractList != null) { extract = Joiner.on(",").join(extractList); } // Try to detect missing imports if (Strings.isNullOrEmpty(extract)) { FileNotFoundException fileNotFoundException = Exceptions.findCause(e, FileNotFoundException.class); if (fileNotFoundException != null) { extract = fileNotFoundException.getMessage(); } } throw new WicketRuntimeException("can't parse " + filename + "; error in line " + e.getLine() + " on column " + e.getColumn() + "; " + e.getType() + ": " + extract); }
return compiled.getBytes(Charset.forName(this.encoding)); } catch (LessException e) { String msg = "Failed to compile less file " + e.getFilename() + " line " + e.getLine() + " cause: " + e.getMessage(); LOG.warn(msg); throw new CompileException(msg, e);
"/web/__faker__", true); } catch (LessException e) { log(e.getMessage()); + "/__faker__"); } catch (LessException e) { log(e.getMessage());
throw new LessException(message, type, filename, line, column, extractList); throw new LessException(root);
throw new LessException(message, type, filename, line, column, extractList); throw new LessException(root);