On 2012-10-01 22:00, Nick Sabalausky wrote:
But, what you said about Ruby is an interesting idea. Ie, that throwing a string is really just sugar for throwing a normal exception. I didn't know that about Ruby. It would be kinda neat if we could do:throw "Shit happened"; And instead of actually throwing a string, it was just sugar for: throw new Exception("Shit happened"); That'd be pretty cool.
Yeah, I wouldn't want this to become a regular String at the catch site, that would be pretty bad.
On a related, but goofier, note: http://semitwist.com/articles/article/view/stupid-coder-tricks-debugging-exception-handlers
That's interesting. But that's also just like creating a function "error" which throws an exception. Which I end up doing sometimes.
-- /Jacob Carlborg
