Revision 1b7ef95e
Added by Marc Dequènes over 15 years ago
- ID 1b7ef95e99ba7be3165140a4f65eed63e88eca04
bin/postman | ||
---|---|---|
report = mail.process
|
||
rescue CyberError => e
|
||
case e.severity
|
||
when :dangerous
|
||
when :grave
|
||
logger.fatal "Fatal processing error, exiting (#{e.message})"
|
||
exit 2
|
||
when :unrecoverable
|
||
logger.error "Internal processing error, skipping mail (#{e.message})"
|
||
next
|
||
when :processable
|
||
logger.error "Untreated processing problem, skipping mail (#{e.message})"
|
||
next
|
||
when :ignorable
|
||
logger.warn "Internal processing warning, continuing (#{e.message})"
|
||
end
|
||
end
|
||
result_tag = report.ok? ? "SUCCESS" : "FAILURE"
|
Also available in: Unified diff
[evol] revised CyberError severities