[OpenSIPS-Devel] [opensips] Runtime Errors Should Include Filename (#299)

David Sanders notifications at github.com
Wed Aug 13 02:04:52 CEST 2014


This is based on OpenSIPS 1.8.0, so this may already be fixed, but glancing at the source code I don't think it has been.

With the `include_file` functionality, parsing errors at startup include the file name and line number of the bad syntax.

However, at runtime, the error messages don't include this informations, for example:

````
WARNING:core:do_action: error in expression (l=183)
````

This makes it very hard to debug runtime errors if you have a dozen include files.

Suggestion for implementing, from a distant perspective:

1. Add a `const char*` to `struct action`, which currently holds the line number.
2. Fill in value during the script parsing, since it is known then
3. To be memory efficient, there should probably be one array of strings for the filenames, and the pointer value in `struct action` would simply point to the correct entry in this array.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/299
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20140812/ae9d86b3/attachment-0001.htm>


More information about the Devel mailing list