From: Yasushi Shoji Date: 2001-01-12T10:51:59+09:00 Subject: [ruby-talk:9168] Re: truncation of error strings 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' -- yashi