Fix conversion of Error objects

Convert V8 object with type='error' to DevTools object with
type='object'. This fixes the problem where Error values
were displayed as "undefined" in the front-end.

Close #299.