I'm better versed in C# than Python.
In C# I can catch all exceptions as default and handle them like showing a error window or write them to a log file.
What about Python? I can't find a default statement, so that I could write all occurred exceptions to a log file and continue with the program.
For example, I want to catch all types of exceptions. In C# it's like this
try
{
do something.....
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString(),
@"Fehler",
MessageBoxButton.OK,
MessageBoxImage.Error
);
return false;
}
It's not necessary to know what kind of exception the program is throwing. How can I do this in Python?