MDL-38525: Assignment - print exception message when assignment upgrade fails.
MDL-38525: Assignment - print exception message when assignment upgrade fails.

Change to use getMessage() from the Exception class will prevent "{$a}" when
$e->error is null.

dilawar/moodle