PostExec is run when the Session Completes or completes with Errors/Failures
By Default it is not executed when you abort a session (set global variable PostExecOnAbortHostBackup=1 if you want it to be started then as well)
If you start the omnib-Command from a Script you can read the last Exit-Code and work your logic, f.E.:
/opt/omni/bin/omnib -datalist Drivetest_LTO3_2100
tbok=$?
if [ $tbok -ne 0 ]
then
<do something here>
fi
Reading a List of saved Files is easy, not saved files might be bit more effort.
You may use the filtered Session-Messages to get what you want:
omnidb -sess <SessionID> -report warning
Since the output from that is quite variable it may take some skills taking it appart properly.