[IronPython] Line info in PythonSyntaxError

Dino Viehland dinov at exchange.microsoft.com
Fri Mar 31 08:38:57 PST 2006


Sorry Szymon, I believe this is my fault.  We did receive your report but somehow it didn't make it into a bug.  I've got the bug opened now, and we'll fix this before beta 6.  Again, sorry for the delay on this.

Do you want to help develop Dynamic languages on CLR?<http://members.microsoft.com/careers/search/details.aspx?JobID=6D4754DE-11F0-45DF-8B78-DC1B43134038> (http://members.microsoft.com/careers/search/details.aspx?JobID=6D4754DE-11F0-45DF-8B78-DC1B43134038)
________________________________
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Szymon Kobalczyk
Sent: Friday, March 31, 2006 1:25 AM
To: Discussion of IronPython
Subject: [IronPython] Line info in PythonSyntaxError

Hi,
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; }
        }

     ...
    }



Regards,

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<mailto:users at lists.ironpython.com>

http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

--




[cid:image001.gif at 01C6549E.8D3E8AD0]


Software Mind Sp z oo
Bociana 22A
31-231 Kraków
Poland
Tel. (+48-12) 6145490
Fax: (+48-12) 6145170
s.kobalczyk at softwaremind.pl<mailto:s.kobalczyk at softwaremind.pl>
www.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: /pipermail/users-ironpython.com/attachments/20060331/566c43bb/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 3654 bytes
Desc: image001.gif
Url : /pipermail/users-ironpython.com/attachments/20060331/566c43bb/image001-0001.gif


More information about the users mailing list