jwillinghalpern / fm-gofer

An easy fetch-like promise library for FileMaker WebViewer apps and widgets.
ISC License
19 stars 2 forks source link

consider removing trycatch in runCallback #19

Open jwillinghalpern opened 3 years ago

jwillinghalpern commented 3 years ago

Think more about this. The main reason I added this was so it would be obvious when you misconfigure your callback. For example if you pass in a non-existent callback id, then the promise variable will return undefined. Then promise.timeoutID will throw an error because you can't get a property of undefined.

We should add an explicit error message for when typeof promise === 'undefined'.

Then decide if we should actually log an error and alert(), or if we should let the exception bubble up.