Added "Main" function to exceptions