Return undefined when formatting fails instead of throwing
Return undefined when formatting fails instead of throwing

Fixes #1643.

Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code