URL:
http://gna.org/bugs/?14339
Summary: Don't abort when not needed
Project: Freeciv
Submitted by: pepeto
Submitted on: vendredi 18.09.2009 à 08:24
Category: general
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Assigned to: None
Originator Email:
Open/Closed: Open
Release:
Discussion Lock: Any
Operating System: None
Planned Release: None
___
Details:
Freeciv client or server often aborts on failed assertion. This patch adds
the possibility to warn and return the user instead of doing hard abort. Of
course, this cannot be used everywhere, but at least on non-fatal errors.
Inspired from glib's g_return_if_fail() and g_return_val_if_fail(), the
following macros are defined:
* RETURN_IF_FAIL() and RETURN_VAL_IF_FAIL() should replace assert().
* RETURN_IF_FAIL_WITH_MESSAGE() and RETURN_VAL_IF_FAIL_WITH_MESSAGE() should
replace die().
___
File Attachments:
---
Date: vendredi 18.09.2009 à 08:24 Name: assert_macros.diff Size: 2 ko
By: pepeto
http://gna.org/bugs/download.php?file_id=6750
___
Reply to this item at:
http://gna.org/bugs/?14339
___
Message posté via/par Gna!
http://gna.org/
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev