Replaced return with throw in MyApp.js and SmartApp.js