private static function getRpcErrorFromException($error_no, $package, $call) {
    if (isset(self::$exceptionLookupTable[$error_no])) {
      $res = self::$exceptionLookupTable[$error_no];
      return new $res[0](sprintf($res[1], $package, $call));
    }
    return new RPCFailedError(sprintf('Remote implementation for %s.%s failed',
                                       $package,
                                       $call));
  }