extensions.st
changeset 18948 2be7e45a29ca
parent 18932 beced7369533
child 18967 945b21ace3f5
equal deleted inserted replaced
18947:5072a56ad7db 18948:2be7e45a29ca
  2334     (jsonPrinter := Smalltalk classNamed:'JSONPrinter') isNil ifTrue:[^ nil].
  2334     (jsonPrinter := Smalltalk classNamed:'JSONPrinter') isNil ifTrue:[^ nil].
  2335 
  2335 
  2336     [
  2336     [
  2337         jsonString := jsonPrinter toJSON:self.
  2337         jsonString := jsonPrinter toJSON:self.
  2338     ] on:Error do:[:ex |
  2338     ] on:Error do:[:ex |
  2339         jsonString := '%1 (an instance of %2) cannot be represented as JSON:\\%3' withCRs
  2339         jsonString := '%1\(an instance of %2)\cannot be represented as JSON because:\\%3' withCRs
  2340                         bindWith:self displayString
  2340                         bindWith:self displayString
  2341                         with:self class className
  2341                         with:self class className
  2342                         with:ex description
  2342                         with:ex description
  2343     ].
  2343     ].
  2344 
  2344