hpcugent/easybuild-framework — pull request #965 by boegel (2014-07-04 08:26:08+00:00)
Title: Restore traceback on hard crashes

without this:

```
$ eb test/framework/easyconfigs/toy-0.0.eb --easyblock=EB_toy_buggy --sourcepath=$PWD/test/framework/sandbox/sources -f
== temporary log file in case of crash /var/folders/8s/_frgh9sj6m744mxt5w5lyztr0000gn/T/easybuild-sIy444/easybuild-1s455C.log
== resolving dependencies ...
== processing EasyBuild easyconfig /Users/kehoste/work/easybuild-framework/test/framework/easyconfigs/toy-0.0.eb
== building and installing toy/0.0...
== fetching files...
== creating build dir, resetting environment...
== unpacking...
== patching...
== preparing...
== configuring...
== building...
ERROR: EasyBuild crashed with an error (at easybuild/main.py:107 in build_and_install_software): Build of /Users/kehoste/work/easybuild-framework/test/framework/easyconfigs/toy-0.0.eb failed (err: global name 'run_cmd' is not defined)
```

with this:

```
$ eb test/framework/easyconfigs/toy-0.0.eb --easyblock=EB_toy_buggy --sourcepath=$PWD/test/framework/sandbox/sources -f
== temporary log file in case of crash /var/folders/8s/_frgh9sj6m744mxt5w5lyztr0000gn/T/easybuild-1mtWa2/easybuild-0B9Lkf.log
== resolving dependencies ...
== processing EasyBuild easyconfig /Users/kehoste/work/easybuild-framework/test/framework/easyconfigs/toy-0.0.eb
== building and installing toy/0.0...
== fetching files...
== creating build dir, resetting environment...
== unpacking...
== patching...
== preparing...
== configuring...
== building...
ERROR: EasyBuild crashed with an error (at easybuild/main.py:110 in build_and_install_software): Traceback (most recent call last):
File "/Users/kehoste/work/easybuild-framework/easybuild/main.py", line 84, in build_and_install_software
(ec_res['success'], app_log, err) = build_and_install_one(ec, orig_environ)
File "/Users/kehoste/work/easybuild-framework/easybuild/framework/easyblock.py", line 1953, in build_and_install_one
result = app.run_all_steps(run_test_cases=run_test_cases)
File "/Users/kehoste/work/easybuild-framework/easybuild/framework/easyblock.py", line 1894, in run_all_steps
self.run_step(stop_name, step_methods, skippable=skippable)
File "/Users/kehoste/work/easybuild-framework/easybuild/framework/easyblock.py", line 1777, in run_step
m(self)
File "/Users/kehoste/work/easybuild-framework/easybuild/framework/easyblock.py", line 1830, in
build_step_spec = ('build', 'building', [lambda x: x.build_step()], True)
File "/Users/kehoste/work/easybuild-framework/test/framework/sandbox/easybuild/easyblocks/toy_buggy.py", line 43, in build_step
run_cmd('gcc toy.c -o toy')
NameError: global name 'run_cmd' is not defined
```

@gjbex: this fixes your request for more sensible error messages (at least partially)

@JensTimmerman, @wpoely86: please review?