Hello,

When constructing DOM documents to create DOM Representations (or, for that
matter, JSON Objects for JSONRepresentations), I need to return a 500 Internal
Server Error when DOM Document/JSON Object creation throws an exception.

For example:
JSONObject jObj = new JSONObject();
try
{
  jObj.put("blah", blah);
  ...
}
catch(JSONException e)
{
   //something needed here?
}

What is the best way to do this?  Currently, if the exception occurs, I just
skip adding the representation to the list of variants returned by
getVariants(), but this returns a 404 - Resource Not Found.

Thanks,
David

Reply via email to