Bill, On 03 Dec 2011, at 00:36, Schwab,Wilhelm K wrote:
> I was taught to never trap Exception - Error is ok to trap, AFAIK. Beyond > that, where does this code live? How often/when does it execute? Exception > handlers are expensive to set up and even more expensive when used. > > This is not really an exceptional condition; it is a predictable failure and > one that can be handled locally rather than needing to be left to the > application layer. IMHO, it is not a good place to use an exception handler. > > Hanging in place of opening a walkback is bad. I suggest fixing that first > (the printing defect seems to be a nice way top reproduce the hang that > should not happen), and THEN fix the #printOn: so the walkback does not > appear. I totally agree on letting all exception bubble up instead of silently swallow them. However, this is a special case: the infrastructure (debugger, exception system) handling the exception is failing while doing its job (agreed: because of somebody else not doing their own job, but that happens), so the infrastructure should protect itself. Have a look at Inspector>>#selectionPrintString What I suggest would be the same. [ object printString ] on: Exception do: [ ' unprintable object of class ', object class ] It does not swallow the exception silently. Maybe the text in Inspector>>#printStringErrorText is better. Sven
