raising errors instead of exiting app

raising error is better to understand why an app stoped