Re: [mediacapture-main] rough draft of new PermissionDeniedError object

That was actually my first thought, but based on how EvalError,
ReferenceError, etc. were defined it seems that the name attribute is
supposed to only have the value of the error type, e.g. 
"ReferenceError"
for a ReferenceError, and so on, with a completely different error 
defined
for each semantically unique failure.  This suggests that there really
 is
no such thing as a MediaStreamError with sub fields to distinguish 
among
PermissionDeniedError, ConstraintNotSatisfiedError, 
OverconstrainedError,
and SourceUnavailableError, each of which are semantically different.
  For
example, ConstraintNotSatisfiedError needs to be able to return a 
string
containing the name of the failing constraint, while 
PermissionDeniedError
does not.
  Thus, it appears that the best way to follow the ES6 pattern is to 
define
a separate error for each.  This would be easier if in ES6 the error 
name,
type, and class were not essentially the same thing.

On Sun, May 10, 2015 at 4:36 PM, Domenic Denicola 
<notifications@github.com>
wrote:

> This is looking good! Although, I am not sure you need to introduce 
new
> error types for all your different cases; what is the full plan 
exactly? A
> single MediaStreamError with a few extra identifying fields should
> probably suffice, right?
>
> —
> Reply to this email directly or view it on GitHub
> 
<https://github.com/w3c/mediacapture-main/pull/170#issuecomment-100697140>
> .
>


-- 
GitHub Notif of comment by burnburn
See 
https://github.com/w3c/mediacapture-main/pull/170#issuecomment-100723821

Received on Monday, 11 May 2015 00:36:53 UTC