Catch value error in the main function.
Catch standard exceptions in the main function.