if post scripts fails, CreatorError is raised to catch script errors such as signing error
$ cat PLATFORM.ks
...
%post
# if you want to catch script error, add set command and trap command at the top of script
set -e
trap 'echo KS POST ERROR: command \"$BASH_COMMAND\" failed with error code $?' ERR
# it will cause an error
/usr/bin/error_command
%end
...
$ sudo mic cr auto PLATFORM.ks
...
INFO: Running post scripts ...
INFO: /tmp/ks-postscript-FShzJp: line 5: /usr/bin/error_command: No such file or directory
INFO: KS POST ERROR: command "/usr/bin/error_command" failed with error code 1
INFO:
ERROR: Failed to execute %post script with '/bin/sh'
Change-Id: I1a34a343b8bdd044ca85939e446c43cce783c900
Signed-off-by: Dohyung Kim <dohyung2.kim@samsung.com>