buffer: throw "friendly" exception if question is too long
authorSascha Silbe <sascha-pgp@silbe.org>
Tue, 18 Jan 2011 18:26:37 +0000 (19:26 +0100)
committerRich Lane <rlane@club.cc.cmu.edu>
Wed, 19 Jan 2011 03:24:23 +0000 (19:24 -0800)
commita0f3184058d499fe767425e44269319dcf9ff600
treeca96b6b52916278a9dcb5bd6c57a36292a53aef1
parent3b17d520ae6303a53533381633fe26eecbabec69
buffer: throw "friendly" exception if question is too long

If a question is too long to fit on screen, the buffer manager currently
throws a hard-to-understand exception deep down in the buffer logic.
Explicitly checking for this condition and throwing a descriptive exception
makes life easier for hook authors.

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
lib/sup/buffer.rb