P
Peter Judge
Guest
>The DOH is passing this to the entity writer and it calls writeError if its a progress.lang.error. I've not had to try to override this before but I've seen some of your other stuff on extending the jsonentitywriter >but to be honest what I've done so far hasn't worked. It takles a couple of steps more than it should, because the JsonEntityWriter's WriteError() method is currently private (not protected). Instead of writing a MyJsonWriter that extend JsonEntityWriter, and overriding the WriteError method, you have to write a MyJsonWriter that uses the JsonEntityWriter, except for errors. Something like Class MyJsonWriter inherits MessageWriter: Def private property mJsonWriter as JsonEntityWriter. Method protected void WriteError(pError as Progress.Lang.Error): End. Method public void Write(pData as Progress.Lang.Object). If valid-object(pData) and type-of(pData, P.L.Error) then Do: WriteError(cast(pData, P.L.Error)). Else mJsonWriter:Write(pdata). End method End.
Continue reading...
Continue reading...