public final void run(Catbert.FastStack stack) throws sage.jep.ParseException { if (networked && Sage.client) { Object[] args = new Object[curNumberOfParameters]; for (int i = args.length - 1; i >= 0; i--) args[i] = stack.pop(); SageTVConnection sn = NetworkClient.getSN(); if (sn != null) stack.push(sn.requestAction(methodName, args)); else stack.push(null); // to keep the stack pointer correct } else { if (API_PROFILING) numCalls++; try { stack.push(runSafely(stack)); } catch (sage.jep.ParseException pe) { throw pe; } catch (Exception e) { e.printStackTrace(); throw new sage.jep.ParseException( "Error in method reflection of " + methodName + " of " + e, e); } } }