Closed federeghe closed 9 years ago
Hi,
You are right there should be an assertion. I will update code soon to catch those kind of errors, unless you already have the changes and about to create a pull request. We welcome any kind of contributions. This issue report is already appreciated.
Otherwise, I would recommend to compile using "void-safe" mode, and such issue with Void reference will be catched at compilation time. In EWF code, all type declaration are attached by default, and then, when a variable or attribute is accepting Void, it is marked with "detachable".
If you are not aware about Eiffel void-safety mode, let me know, and I will share a few link to learn about it. (With recent version of EiffelStudio, this is the default compilation mode).
Thank you, we are working on small university project using Eiffel. We started without using void-safe mode (and this was probably a bad choice), but it remains only 10 days to complete the project and refactoring the code now can be complicated :) For future projects, I'll use for sure void-safe compilation.
I would have tried to add the assertion, but I don't really know how agents work, and at present it's hard for me to hack EWF code.
Ok I understand. And yes you are right, for next project, I highly recommend you to start directly with full void-safety. This is really really a time saver, and improve quality of code.
About adding assertion, ok I will do that, but here this has nothing to deal with agent ... in this case an agent is just a PROCEDURE or FUNCTION object, as any other object.
I will let you know, when this is done, so that you can see this is a simple task.
Thanks for contributing by reporting an issue or requesting improvements. Regards, -- Jocelyn
On Thu, Nov 27, 2014 at 11:39 PM, Federico Reghenzani < notifications@github.com> wrote:
Thank you, we are working on small university project using Eiffel. We started without using void-safe mode (and this was probably a bad choice), but it remains only 10 days to complete the project and refactoring the code now can be complicated :) For future projects, I'll use for sure void-safe compilation.
I would have tried to add the assertion, but I don't really know how agents work, and at present it's hard for me to hack EWF code.
— Reply to this email directly or view it on GitHub https://github.com/EiffelWebFramework/EWF/issues/159#issuecomment-64835036 .
This is not an high priority bug, but if you call map_uri_template_agent_with_request_methods with a Void agent, when a request arrives a Segmentation Fault happens. It's quite hard to debug what happened until you realize that you have passed a Void agent. Probably a "require" somewhere that raises a Void Target can be very useful.
Example:
Attached the call stack of segmentation fault. .