Skip to content

Commit 7939429

Browse files
author
Peter Amstutz
committed
Suggest --debug when reporting exceptions.
1 parent 67d78cf commit 7939429

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cwltool/main.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ def main(args=None,
502502
print_dot=args.print_dot,
503503
rdf_serializer=args.rdf_serializer)
504504
except Exception as e:
505-
_logger.error("I'm sorry, I couldn't load this CWL file.\n%s", e, exc_info=(e if args.debug else False))
505+
_logger.error("I'm sorry, I couldn't load this CWL file, try again with --debug for more information.\n%s\n", e, exc_info=(e if args.debug else False))
506506
return 1
507507

508508
if type(t) == int:
@@ -554,7 +554,10 @@ def main(args=None,
554554
_logger.error("Input object failed validation:\n%s", e, exc_info=(e if args.debug else False))
555555
return 1
556556
except workflow.WorkflowException as e:
557-
_logger.error("Workflow error:\n %s", e, exc_info=(e if args.debug else False))
557+
_logger.error("Workflow error, try again with --debug for more information:\n %s", e, exc_info=(e if args.debug else False))
558+
return 1
559+
except Exception as e:
560+
_logger.error("Unhandled error, try again with --debug for more information:\n %s", e, exc_info=(e if args.debug else False))
558561
return 1
559562

560563
return 0

0 commit comments

Comments
 (0)