Hello -- On Fri, 12 Jan 2001, Yasushi Shoji wrote: > At Fri, 12 Jan 2001 09:40:02 +0900, > Raja S. wrote: > > > > Is there any where to prevent the truncation of messages produced during > > error handling. Consider the following: > > > > irb> Dir.chdir "/nfs/mantaray/home/user1/raja/Research/Raja/Results-gls-scale+splib/matrix.medium/Scale/0" > > > > Errno::ENOENT: No such file or directory - "/nfs/mantaray/home/user1/raja/Research/Raja/Results-gls-scale+splib/matrix...." > > this is just not trancation but you can try: > > begin > Dir.chdir "/nfs/mantaray/home/user1/raja/Research/Raja/Results-gls-scale+splib/matrix.medium/Scale/0" > rescue => e > puts 'foo' > end > > this should yields only 'foo'. if you need to edit error message as > well, `e.message' to get it from `e' I think the truncation behavior may be a question of Ruby version. From Changelog (1.6.2): Mon Dec 4 09:49:36 2000 Yukihiro Matsumoto <matz / ruby-lang.org> * string.c (rb_str_inspect): output whole string contents. no more `...' (though capturing the string, as above, might be better for your [Raja's] purposes anyway). David -- David Alan Black home: dblack / candle.superlink.net work: blackdav / shu.edu Web: http://pirate.shu.edu/~blackdav