#!/usr/bin/env node; const Utils = require('./Utils'); const main = async () => { let i = 0; let d = 0; try { i = Utils.stoi(process.argv[2]); d = Utils.stod(process.argv[3]); console.log(Utils.format("i + d = {0:f}", i + d)); } catch (ex) { if (ex instanceof Utils.NumberFormatError) { console.log("Can't convert command line argument!"); } else if (ex instanceof Error) { console.log("Don't know what went wrong!"); } } finally { console.log("This statement always executes."); } } main().catch( e => { console.error(e) } );