public void enableInterruptCharacter() { try { if (intr != null) { settings.set("intr", intr); } } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to enable interrupt character", e); } }
public void enableLitteralNextCharacter() { try { if (lnext != null) { settings.set("lnext", lnext); } } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to enable litteral next character", e); } }
public void disableInterruptCharacter() { try { intr = getSettings().getPropertyAsString("intr"); if ("<undef>".equals(intr)) { intr = null; } settings.undef("intr"); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to disable interrupt character", e); } }
public void disableLitteralNextCharacter() { try { lnext = getSettings().getPropertyAsString("lnext"); if ("<undef>".equals(lnext)) { lnext = null; } settings.undef("lnext"); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to disable litteral next character", e); } }
@Override public synchronized void setEchoEnabled(final boolean enabled) { try { if (enabled) { settings.set("echo"); } else { settings.set("-echo"); } super.setEchoEnabled(enabled); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to ", enabled ? "enable" : "disable", " echo", e); } }
Log.error("Paste failed: ", e);
Log.error("Could not expand event", e); beep(); buf.clear();
public void enableLitteralNextCharacter() { try { if (lnext != null) { settings.set("lnext", lnext); } } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to enable litteral next character", e); } }
public void enableInterruptCharacter() { try { if (intr != null) { settings.set("intr", intr); } } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to enable interrupt character", e); } }
public String createUrlPath(int timeoutMs, int limit) { final StringBuilder url = new StringBuilder(CambriaPublisherUtility.makeConsumerUrl(fTopic, fGroup, fId)); final StringBuilder adds = new StringBuilder(); if (timeoutMs > -1) { adds.append("timeout=").append(timeoutMs); } if (limit > -1) { if (adds.length() > 0) { adds.append("&"); } adds.append("limit=").append(limit); } if (fFilter != null && fFilter.length() > 0) { try { if (adds.length() > 0) { adds.append("&"); } adds.append("filter=").append(URLEncoder.encode(fFilter, "UTF-8")); } catch (UnsupportedEncodingException e) { Log.error("Failed due to UnsupportedEncodingException" + e); } } if (adds.length() > 0) { url.append("?").append(adds.toString()); } return url.toString(); }
public void disableInterruptCharacter() { try { intr = getSettings().getPropertyAsString("intr"); if ("<undef>".equals(intr)) { intr = null; } settings.undef("intr"); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to disable interrupt character", e); } }
public void disableLitteralNextCharacter() { try { lnext = getSettings().getPropertyAsString("lnext"); if ("<undef>".equals(lnext)) { lnext = null; } settings.undef("lnext"); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to disable litteral next character", e); } }
@Override public synchronized void setEchoEnabled(final boolean enabled) { try { if (enabled) { settings.set("echo"); } else { settings.set("-echo"); } super.setEchoEnabled(enabled); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to ", enabled ? "enable" : "disable", " echo", e); } }
@Override public Iterable<String> fetch(int timeoutMs, int limit) throws IOException { final LinkedList<String> msgs = new LinkedList<String>(); final String urlPath = createUrlPath(timeoutMs, limit); getLog().info("UEB GET " + urlPath); try { final JSONObject o = get(urlPath); if (o != null) { final JSONArray a = o.getJSONArray("result"); if (a != null) { for (int i = 0; i < a.length(); i++) { msgs.add(a.getString(i)); } } } } catch (HttpObjectNotFoundException e) { // this can happen if the topic is not yet created. ignore. Log.error("Failed due to topic is not yet created" + e); } catch (JSONException e) { // unexpected response reportProblemWithResponse(); Log.error("Failed due to jsonException", e); } catch (HttpException e) { throw new IOException(e); } return msgs; }
Log.error("Paste failed: ", e);
Log.error("Could not expand event", e); beep(); buf.clear();
@SuppressWarnings("unused") @Substitute public static Terminal create(String ttyDevice) { Terminal t; try { t = new UnixTerminal(); t.init(); } catch (Exception e) { Log.error("Failed to construct terminal; falling back to UnsupportedTerminal", e); t = new UnsupportedTerminal(); } Log.debug("Created Terminal: ", t); return t; } }