catch(Exception* e) { Console::WriteLine("ERROR: {0}", e->Message); The main() routine also demonstrates what would happen if you call the secure Login .