mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Class.newInstance() propagates any exception thrown by the nullary constructor, including a checked exception. This effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler. The Constructor.newInstance method avoids this problem by wrapping any exception thrown by the constructor in a (checked) InvocationTargetException.