It seems to me that you are favoring handling of exception more within the Model piece of the presenation layer using an "event" dispatcher
Well I have thown today all threads away
I have reduced my application by 3 classes (RequestModel, RequestEvent, RequestListener). I have now the the design like Max.
I beleive having no threads makes the client ugly, but design simpler...
Do you think it Ok in the view to use "instead of" to idetify a real exception which caused GUIControllerException, like Max did?
(It is not a critic, it is just a question).
Originally posted by Vlad Rabkin:
The controller in sample project in the Max book wraps all exceptions in the GUIException. The View (Main Window) handels then all exceptions.
I have threads in my GUI client. It means that my Controller doesn't rethrow exception
directly, rather then change appropriate model (RequestModel), which send events to the View. If I just wrap original exception to the GUIException (which will be passed to the client with RequestModel to the view) without changing its message, the view will not be able to detect where the problem occured (e.g. while searching or booking).
Why not just throw a GUISearchException, GUIBookingException, etc
1) You used instanceof in the view do define what the real exception occured (see a sample in my previous message). I followed your idea.
Do you think it is Ok to use it here? (I have always tried to avoid instanceof in my programmes, since I thought it is not a very good thing in OO)
I beleive having a multithreaded client to my opinion is almost a obligatory thing. [...] It looks like nobody was penaltied for not using single-threaded client.
Am I on the right track by moving my client to the single-threaded model?
I thought you saw those people accusing me of being an insomniac in Sydney, Australia
You still didn's where you live now ...
I am developing now two small classes providing locking ... May I publish them in the new topic
I apologise in advance if any of the bartender's photos (especially mine) scare you
Please try and keep the concept generic ...
Rototillers convert rich soil into dirt. Please note that this tiny ad is not a rototiller:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton