# setters in the Exception class?

- Thread: https://externals.io/message/28108
- Original archive: https://news-web.php.net/php.internals/28108
- Started by Lukas Kahwe Smith on 2007-02-21T08:54:18+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #28108 — Lukas Kahwe Smith — 2007-02-21T08:54:18+00:00

URL: https://externals.io/message/28108#28108

Hello,

I am consuming some Java provide webservices. In some cases we get 
SOAPFault instances, that I would like to massage a bit, since I do not 
like the structure or format in the generated SOAPFault (for example it 
does not set the error code properly). However since there are no 
setters, I have to create a new Exception instance. So I am wondering if 
it makes sense to add some setters to the default Exception class to 
make this sort of thing possible without creating a new Exception 
instance ..?

regards,
Lukas

---

## #28109 — Marcus Boerger — 2007-02-21T09:09:57+00:00

URL: https://externals.io/message/28108#28109 · In reply to: #28108

Hello Lukas,

  the default exception class will not get any setters anytime. The reason
is that we have to rely on the generated info and cannot change it due to
the way the exception object is used and especially destroyed. I see two
ways here. First changing/fixing whatever SOAPFault is based on and second
we could create what you need - generating a working copy - somewhere.

best regards
marcus

Wednesday, February 21, 2007, 9:54:18 AM, you wrote:

> Hello,

> I am consuming some Java provide webservices. In some cases we get 
> SOAPFault instances, that I would like to massage a bit, since I do not 
> like the structure or format in the generated SOAPFault (for example it 
> does not set the error code properly). However since there are no 
> setters, I have to create a new Exception instance. So I am wondering if 
> it makes sense to add some setters to the default Exception class to 
> make this sort of thing possible without creating a new Exception 
> instance ..?

> regards,
> Lukas




Best regards,
 Marcus
