Minor tweak: avoid throwing exceptions and extract variables
1 file changed