Add function to unwrap Results logging failures
authorMichele Tartara <mtartara@google.com>
Wed, 21 Aug 2013 14:15:30 +0000 (14:15 +0000)
committerMichele Tartara <mtartara@google.com>
Wed, 21 Aug 2013 15:18:40 +0000 (15:18 +0000)
commit838393d1e7f9c0e7dbd2885eb70b6119fa85db9a
tree79de90c17c3103c2e94aad50a0f14f41499990d2
parent125e1230880fad8f29f57446cc7bbccfad73a953
Add function to unwrap Results logging failures

Add logWarningIfBad, a utility function similar to exitIfBad, that logs a
warning and returns a default value instead of just crashing the program if
the unpacked value is Bad.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
src/Ganeti/Utils.hs