ApplicationObject: added handling of exceptions

Made catches with messageboxes to aid in debugging