Parses the SimpleFM result and determines if a FileMaker error was thrown.

@param  object A SimpleFM result object
@return none
508972
protected function checkResultForError($result, $commandArrayUsed)
    {
        if (empty($result)) {
            throw new NoResultReturnedException('The SimpleFM request did not return a result.');
        }
        if ($result->getErrorCode() == 401) {
            throw new RecordsNotFoundException($result->getErrorMessage(), $result->getErrorCode(), $result);
        }
        if ($result->getErrorCode() !== 0) {
            $message = $result->getErrorMessage() . ". Command used: " . json_encode($commandArrayUsed);
            throw new GeneralException($message, $result->getErrorCode(), $result);
        }
    }
457833
public static final byte[] serializeToBytes(final Object object) {
    if (object == null)
      throw new IllegalArgumentException("Object was null");
    try {
      return jsonMapper.writeValueAsBytes(object);
    } catch (JsonProcessingException e) {
      throw new JSONException(e);
    }
  }
1068648
public T object(Object object) throws IOException {
		text(stringifierFactory.toString(object));
		return (T) this;
	}
907101
@Nullable
  public static Long parseLongObj (@Nullable final Object aObject)
  {
    return parseLongObj (aObject, DEFAULT_RADIX, null);
  }
701775
public static String simpleObjectName(Object object) {
        if (object == null) {
            return "<null>";
        }
        StringBuilder builder = new StringBuilder();
        builder.append(simpleClassName(object.getClass()))
            .append('#')
            .append(objectId(object));
        return builder.toString();
    }
592999
@Override
	public Object parse(String source) throws Exception {
		DocumentBuilder builder = builderFactory.newDocumentBuilder();
		InputSource is = new InputSource(new StringReader(source));
		Node node = builder.parse(is).getFirstChild();
		LinkedHashMap<String, Object> map = new LinkedHashMap<>();
		return copyChildren("xml", node, map);
	}
57160
public static final Class<?> getComponentType(Object object) {
        Class<?> result = object.getClass().getComponentType();
        while (result.isArray()) {
            result = result.getComponentType();
        }
        return result;
    }
234260
private void readObject(ObjectInputStream in)
        throws IOException, ClassNotFoundException {
        in.defaultReadObject();
        severity = SEVERITY_INFO;
        summary = null;
        detail = null;
        int ordinal = in.readInt();
        if (ordinal == SEVERITY_INFO.getOrdinal()) {
            severity = FacesMessage.SEVERITY_INFO;
        } else if (ordinal == SEVERITY_WARN.getOrdinal()) {
            severity = FacesMessage.SEVERITY_WARN;
        } else if (ordinal == SEVERITY_ERROR.getOrdinal()) {
            severity = FacesMessage.SEVERITY_ERROR;
        } else if (ordinal == SEVERITY_FATAL.getOrdinal()) {
            severity = FacesMessage.SEVERITY_FATAL;
        }
        summary = (String) in.readObject();
        detail = (String) in.readObject();
        rendered = (Boolean) in.readObject();
    }
504593
protected void jSONSuccess(PMStrutsContext ctx, Object object) throws PMForwardException {
        final String toJson = new Gson().toJson(object);
        ctx.put(PM_VOID_TEXT, toJson);
        success(ctx, "converters/void.jsp", false);
    }
1265674
public Object parseObject(String source, ParsePosition pos)
    {

        try
        {
            return parse(source, pos);
        } catch (ParseException e)
        {
            pos.setIndex(0);
            pos.setErrorIndex(e.getErrorOffset());
        }
        return null;

    }
463233
def read_ncstream_err(fobj):
    """"""
    err = read_proto_object(fobj, stream.Error)
    raise RuntimeError(err.message)
676946
public static void serializeObjectToFile(Object object, String filename) {
    FileOutputStream fos = null;
    ObjectOutputStream out = null;
    try {
      fos = new FileOutputStream(filename);
      out = new ObjectOutputStream(fos);
      out.writeObject(object);
      out.close();
    } catch(IOException ex) {
      ex.printStackTrace();
      System.exit(1);
    }    
  }
691044
public static <T extends Errors> T parseErrorResponse(ObjectMapper mapper, ResponseBody errorResponse, Class<T> cls) throws IOException {
        return mapper.readValue(errorResponse.bytes(), cls);
    }
1338995
@Override
    public final Object parseObject(String source,
                                    ParsePosition parsePosition) {
        return parse(source, parsePosition);
    }
1314464
private Object parseClassParameter(final String serializedObject) {
        Object res = null;
        try {
            res = Class.forName(serializedObject);
        } catch (final ClassNotFoundException e) {
            throw new CoreRuntimeException("Impossible to load class " + serializedObject, e);
        }
        return res;
    }
1230670
private SyncError getSyncError(JsonNode jsonNode) throws IOException {
		ObjectMapper mapper = new ObjectMapper();

		SimpleModule simpleModule = new SimpleModule("SyncErrorDeserializer", new Version(1, 0, 0, null));
		simpleModule.addDeserializer(SyncError.class, new SyncErrorDeserializer());

		mapper.registerModule(simpleModule);

		return mapper.treeToValue(jsonNode, SyncError.class);
	}
1079372
function errorHandlerFactory() {
    var _recoverDecodingErrorDate = null;
    var _recoverAudioCodecErrorDate = null;

    return function() {
      var now = Date.now();

      if (!_recoverDecodingErrorDate || (now - _recoverDecodingErrorDate) > 2000) {
        _recoverDecodingErrorDate = now;
        hls.recoverMediaError();
      }
      else if (!_recoverAudioCodecErrorDate || (now - _recoverAudioCodecErrorDate) > 2000) {
        _recoverAudioCodecErrorDate = now;
        hls.swapAudioCodec();
        hls.recoverMediaError();
      }
      else {
        console.error('Error loading media: File could not be played');
      }
    };
  }