context.setLineDash() works in Chrome, but in FireFox 18.0.1 results in
TypeError: this.setLineDash is not a function
deep in the bootstrap.dart.js file.
Even if I use this function
void setLineDashCatch(var ctx,var param) {
try {
ctx.setLineDash(param);
} on Exception catch (e) {
log('SetLineDash exception');
}
}
The exception is not caught, and the method is aborted.
What is the best way to avoid the method being aborted?
You don’t get the log because it is not an
Exceptionthat is thrown. It is rather aNoSuchMethodError. The following code should work :