/** * Constructs an exception. */ public NoSuchClassError(String className, Error cause) { super(cause.toString(), cause); this.className = className; }
/** * Constructs an exception. */ public NoSuchClassError(String className, Error cause) { super(cause.toString(), cause); this.className = className; }
/** * Constructs an exception. */ public NoSuchClassError(String className, Error cause) { super(cause.toString(), cause); this.className = className; }
public String toString() { return ( m != null ) ? m : super.toString(); } }
/** * Constructs an exception. */ public NoSuchClassError(String className, Error cause) { super(cause.toString(), cause); this.className = className; }
@ExceptionHandler(AssertionError.class) public String handleAssertionError(Error err) { return err.toString(); } }
@ExceptionHandler(AssertionError.class) public String handleAssertionError(Error err) { return err.toString(); } }
public static boolean isTinkerPatchServiceRunning(Context context) { final ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); String serverName = getTinkerPatchServiceName(context); if (serverName == null) { return false; } try { // ActivityManager getRunningAppProcesses() List<ActivityManager.RunningAppProcessInfo> appProcessList = am .getRunningAppProcesses(); if (appProcessList == null) { return false; } for (ActivityManager.RunningAppProcessInfo appProcess : appProcessList) { String processName = appProcess.processName; if (processName.equals(serverName)) { return true; } } } catch (Exception e) { Log.e(TAG, "isTinkerPatchServiceRunning Exception: " + e.toString()); return false; } catch (Error e) { Log.e(TAG, "isTinkerPatchServiceRunning Error: " + e.toString()); return false; } return false; }
/** * Turn on the keyboard overlay. This is a keyboard that hovers in front of the user, that can be typed upon by * pointing the ray extending from the top of the controller at the key the user wants to press. * @param showingState - true or false * @return - true if successful. If this call fails, an error is logged. */ public static boolean setKeyboardOverlayShowing(boolean showingState) { int ret; if (showingState) { Pointer pointer = new Memory(3); pointer.setString(0, "mc"); Pointer empty = new Memory(1); empty.setString(0, ""); ret = vrOverlay.ShowKeyboard.apply(0, 0, pointer, 256, empty, (byte) 1, 0); keyboardShowing = 0 == ret; //0 = no error, > 0 see EVROverlayError if (ret != 0) { logger.error("VR Overlay Error: " + vrOverlay.GetOverlayErrorNameFromEnum.apply(ret).getString(0)); } } else { try { vrOverlay.HideKeyboard.apply(); } catch (Error e) { logger.error("Error bringing up keyboard overlay: " + e.toString()); } keyboardShowing = false; } return keyboardShowing; }
@Override public void run() { try { while (!this.isShutdown()) { sockets.poll(); if (isControlMsg()) { handleControlMsg(); } else if (isHeartbeatMsg()) { handleHeartbeat(); } else if (isShellMsg()) { handleShell(); } else if (isStdinMsg()) { handleStdIn(); } else if (this.isShutdown()) { break; } } } catch (Exception e) { throw new RuntimeException(e); } catch (Error e) { logger.error(e.toString()); } finally { close(); } }
/** * Constructs an exception. */ public NoSuchClassError(String className, Error cause) { super(cause.toString(), cause); this.className = className; }
/** * Constructs an exception. */ public NoSuchClassError(String className, Error cause) { super(cause.toString(), cause); this.className = className; }
/** * Constructs an exception. */ public NoSuchClassError(String className, Error cause) { super(cause.toString(), cause); this.className = className; }
/** * Constructs an exception. */ public NoSuchClassError(String className, Error cause) { super(cause.toString(), cause); this.className = className; }
/** * Constructs an exception. */ public NoSuchClassError(String className, Error cause) { super(cause.toString(), cause); this.className = className; }
/** Annotate the NoClassDefFoundError with some info about the class we were trying to load. */ protected static Error noClassDefFound( String className, Error e ) { return new NoClassDefFoundError( "A class required by class: "+className +" could not be loaded:\n" +e.toString() ); }
/***********************************************************************/ public String toString() { return super.toString() + "\n" + (cause == null ? "" : "Causation: " + cause.toString()); } /***********************************************************************/
@Override public String toString() { if(!MockFramework.isEnabled()){ return super.toString(); } return getDelegate().toString(); }
private static JPQLNode parse(String jpql) { if (jpql == null) jpql = ""; try { return (JPQLNode) new JPQL(jpql).parseQuery(); } catch (Error e) { // special handling for Error subclasses, which the // parser may sometimes (unfortunately) throw throw new UserException(_loc.get("parse-error", new Object[]{ e.toString(), jpql })); } }
private static JPQLNode parse(String jpql) { if (jpql == null) jpql = ""; try { return (JPQLNode) new JPQL(jpql).parseQuery(); } catch (Error e) { // special handling for Error subclasses, which the // parser may sometimes (unfortunately) throw throw new UserException(_loc.get("parse-error", new Object[]{ e.toString(), jpql })); } }