Newlines in exception messages
Newlines in exception messages
Hello,
sorry if this has been talked about before, but I couldn't find it in the forum archives and the FAQ. I am testing madExcept 3.0 with the "simple dialog with Details button", and I am wondering why the exception message has the newline characters missing and how can I have them back if possible.
Thanks
--
Nando
sorry if this has been talked about before, but I couldn't find it in the forum archives and the FAQ. I am testing madExcept 3.0 with the "simple dialog with Details button", and I am wondering why the exception message has the newline characters missing and how can I have them back if possible.
Thanks
--
Nando
madExcept intentionally removes all control chars from the exception message. I'm not sure right now why I implemented that. I guess I ran across some exception messages with bad chars in it, maybe with bad line breaks in it.
I could change madExcept, so that it doesn't remove line breaks, but I'm not sure whether it's really a good idea.
You could use "%lf%" in your exception message. madExcept doesn't remove that and shows it as a line break. Does that help? Or do you still prefer, if madExcept wouldn't remove the line breaks in the first place?
I could change madExcept, so that it doesn't remove line breaks, but I'm not sure whether it's really a good idea.
You could use "%lf%" in your exception message. madExcept doesn't remove that and shows it as a line break. Does that help? Or do you still prefer, if madExcept wouldn't remove the line breaks in the first place?
I'm not sure what a "bad" line break is so I cannot comment. If there are characters that cause problems to some of your processing then you could filter them and just leave line breaks in. I don't think any other control character is needed, but line breaks are different. They are used by many libraries to format exception messages.madExcept intentionally removes all control chars from the exception message. I'm not sure right now why I implemented that. I guess I ran across some exception messages with bad chars in it, maybe with bad line breaks in it.
I'm sure it's not a good idea to remove them, at least from my POV.I could change madExcept, so that it doesn't remove line breaks, but I'm not sure whether it's really a good idea.
I don't have problems with my exception messages only, but with those thrown by libraries such as IBObjects as well. I guess I could install some global handler that transforms all newlines to %lf% (would madExcept allow that, BTW?), but I'd certainly prefer an option to turn this filtering off; I believe it could be useful for many users, not just me.You could use "%lf%" in your exception message. madExcept doesn't remove that and shows it as a line break. Does that help? Or do you still prefer, if madExcept wouldn't remove the line breaks in the first place?
Thanks.
If you want to try the next beta build which already will include this change, you can download it here tomorrow:
http://madshi.net/madCollectionBeta.exe
http://madshi.net/madCollectionBeta.exe