[IronPython] Line info in PythonSyntaxError

Szymon Kobalczyk s.kobalczyk at softwaremind.pl
Fri Mar 31 11:25:06 CEST 2006

First big thanks for yet another great release!

However, as I see you haven't addressed this small issue I described a 
while ago. Please confirm you have received my report and if you are 
going to address it. Now I've manually added these properties to the 
PythonSyntaxError class:

    public class PythonSyntaxError : Exception, ICustomExceptionConversion {
        int lineNo, columnNo;
        string lineText, file;

        public int LineNumber
            get { return lineNo; }

        public int ColumnNumber
            get { return columnNo; }

        public string File
            get { return file; }

        public string LineText
            get { return lineText; }


Szymon Kobalczyk

Szymon Kobalczyk napisał(a):
> Hi,
> I found it quite convenient to be able to catch parsing error from the 
> engine's Compile method and read the line and column number where the 
> error occurred. In previous version this was simply displayed in the 
> PythonSyntaxError's message. Currently it was removed and instead this 
> exception carries this information in private fields so it can recreate 
> PythonException. Do you have anything against exposing these fields as 
> read-only properties?
> Regards,
> Szymon Kobalczyk
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


	Software Mind 	
*Software Mind Sp z oo*
Bociana 22A
31-231 Kraków
Tel. (+48-12) 6145490
Fax: (+48-12) 6145170
s.kobalczyk at softwaremind.pl <mailto:s.kobalczyk at softwaremind.pl>
*Szymon Kobalczyk*
Software Developer

This email may contain confidential and privileged material for the sole 
use of the intended recipient(s). Any review, use, retention, 
distribution or disclosure by others is strictly prohibited. If you are 
not the intended recipient (or authorized to receive for the recipient), 
please contact the sender by reply email and delete all copies of this 
message. Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive 
emails on the basis that we are not liable for any such corruption, 
interception, tampering, amendment or viruses or any consequence thereof.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060331/2fe1079e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: minism.gif
Type: image/gif
Size: 3654 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060331/2fe1079e/attachment.gif>

More information about the Ironpython-users mailing list