trap works funny

Thomas Michael Hagen <[email protected]>
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
this is an (edited for clarity) excerpt from a program i running. i
expected it to liaf to the next file on both traps, and it does on the
first one. however, the program simply stops without any explanation
on the last trap.

{
    match  <fromend> (:: :filename:) [:files:] /(^.*?\.dag)\n/
    output /:*:filename:\n/
    call /:read-file:/ [:*:filename:]
    liaf
}

:read-file: (:name:)
{
    {
	input (:ffile:) [:*:name:]
	trap /unable to read-open the file/
	output /Couldn't read file! Trying next file.\n/
	return
	
	trap /program has overflowed/ #the file is too big for the machine's memory
	output /File too big!\n/
	return
    }
    #doing stuff here if the file exists and is not too big
}


this is the output of running it when 'files' is a list that begins
with a nonexistent file, and the second one is too huge:

nonexistant-file.dag
Couldn't read file! Trying next file.
/prosjekt/aviskorpus/ap/dag/2007/20071120.dag

note the missing 'File too big' output

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.