Fix crash when test command raises exception

It prints the error message and a red desktop notification with no content