# Exception getting truncated (at terminal width)

**URL:** <https://www.ruby-forum.com/t/exception-getting-truncated-at-terminal-width/152197>\
**Category:** Ruby\
**Created:** [October 31, 2008, 5:15am UTC](https://www.ruby-forum.com/t/exception-getting-truncated-at-terminal-width/152197 "2008-10-31T05:15:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [October 31, 2008, 5:15am UTC](https://www.ruby-forum.com/t/exception-getting-truncated-at-terminal-width/152197/1 "2008-10-31T05:15:59Z")

</div>

Of late I am not getting the full exception on the screen. Perhaps this  
is happening after I reorganized my project using ‘hoe’. The line is  
getting truncated at end of screen, rather than being wrapped.

e.g.  
/Users/sentinel/work/projects/rbcurse/lib/rbcurse/singletable.rb:158:in  
`disable_key_fields': undefined method`g)

Very often i am getting very little of the error message to be able to  
figure out anything. Ruby is aware of the number of cols of my terminal  
and is truncating the exception at terminal width i/o wrapping the same.

thanks.

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [October 31, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/exception-getting-truncated-at-terminal-width/152197/2 "2008-10-31T19:51:47Z")

</div>

Nit K. wrote:

> and is truncating the exception at terminal width i/o wrapping the same.
> 
> thanks.

It looks like you are using curses so I will answer with that  
assumption. If you use the command nonl() it will turn off the mapping  
of a carriage return on a newline. I think this will give you the  
behavior you are seeing.  
I haven’t tried using curses with Ruby yet so am not entirely sure of  
some of it’s behavior.
