fontfaceobserver icon indicating copy to clipboard operation
fontfaceobserver copied to clipboard

Uncaught exception on incorrect font name

Open SamStonehouse opened this issue 7 years ago • 3 comments

I've been getting some exceptions which I believe are down to me incorrectly naming a font:

Uncaught (in promise) A {family: "Source Sans Pro Regular", style: "normal", weight: "normal", stretch: "normal"}

Would it be possible to have nicer error reporting than this?

SamStonehouse avatar May 07 '17 09:05 SamStonehouse

What kind of error message would you like to see in this case? I haven't been very satisfied with the rejection messages, so any input is welcome.

bramstein avatar May 22 '17 08:05 bramstein

I don't have a preference, just not an uncaught exception. An indication that it could be the font name would be useful, I'm not sure what else could cause it to fail.

SamStonehouse avatar May 30 '17 09:05 SamStonehouse

There are a couple of other cases that cause the font to fail loading (network, timeout, etc.), but it's hard to distinguish between them from JavaScript. I'll have a look and see if I can make it better.

bramstein avatar May 31 '17 15:05 bramstein