Re: when crm can't read a file
Paolo <[email protected]>
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Message-ID | <20090304104251.GA1207@localhost> |
On Wed, Mar 04, 2009 at 09:36:21AM +0100, Thomas Michael Hagen wrote:
>
> is there a good idiom for continuing (not crashing) when crm can't
> read a file?
> the default is the 'for some reason, the file could not be read'-error
check TRAP instruction in the docs.
e.g.
crm '-{ window
{ input [/tmp/x]
trap /unable to read-open/
output /nok\n/
}
output /ok\n/
}'
1. result for /tmp/x exists & readable
ok
1. result if /tmp/x doesn't exist
nok
ok
HTH
--
paolo
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H