Hi Merrill,

This issue is now fixed in cvs.

Thanks for reporting this !

Gert

----- Original Message -----
From: "Merrill Cornish" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 06, 2004 9:40 PM
Subject: [Nant-users] Ungraceful Syntax Error Handling


> I am running NAnt 2.1.93.
>
> I used a regex task
>
> <regex pattern="^(?'msi-id'\d\d\d\d\d\d_\d\d_\d\d)$" ... />
>
> which resulted in the following output:
> =============================
>
> INTERNAL ERROR
>
> System.ArgumentException: parsing "(?'msi-id'\d\d\d\d_\d\d_\d\d)" -
Reference to undefined group name id.
> Parameter name: (?'msi-id'\d\d\d\d_\d\d_\d\d)
>    at System.Text.RegularExpressions.RegexParser.ScanGroupOpen()
>    at System.Text.RegularExpressions.RegexParser.ScanRegex()
>    at System.Text.RegularExpressions.RegexParser.Parse(String re,
RegexOptions op)
>    at System.Text.RegularExpressions.Regex..ctor(String pattern,
RegexOptions options)
>    at NAnt.Core.Tasks.RegexTask.ExecuteTask() in C:\Documents and
Settings\drieseng\Local
Settings\Temp\tmp2267.tmp\src\NAnt.Core\Tasks\RegexTask.cs:line 143
>    at NAnt.Core.Task.Execute() in C:\Documents and Settings\drieseng\Local
Settings\Temp\tmp2267.tmp\src\NAnt.Core\Task.cs:line 177
>    at NAnt.Core.TaskContainer.ExecuteChildTasks() in C:\Documents and
Settings\drieseng\Local
Settings\Temp\tmp2267.tmp\src\NAnt.Core\TaskContainer.cs:line 120
>    at NAnt.Core.TaskContainer.ExecuteTask() in C:\Documents and
Settings\drieseng\Local
Settings\Temp\tmp2267.tmp\src\NAnt.Core\TaskContainer.cs:line 90
>    at NAnt.Core.Tasks.IfTask.ExecuteTask() in C:\Documents and
Settings\drieseng\Local
Settings\Temp\tmp2267.tmp\src\NAnt.Core\Tasks\IfTask.cs:line 335
>    at NAnt.Core.Task.Execute() in C:\Documents and Settings\drieseng\Local
Settings\Temp\tmp2267.tmp\src\NAnt.Core\Task.cs:line 177
>    at NAnt.Core.TaskContainer.ExecuteChildTasks() in C:\Documents and
Settings\drieseng\Local
Settings\Temp\tmp2267.tmp\src\NAnt.Core\TaskContainer.cs:line 120
>    at NAnt.Core.TaskContainer.ExecuteTask() in C:\Documents and
Settings\drieseng\Local
Settings\Temp\tmp2267.tmp\src\NAnt.Core\TaskContainer.cs:line 90
>    at NAnt.Core.Tasks.IfTask.ExecuteTask() in C:\Documents and
Settings\drieseng\Local
Settings\Temp\tmp2267.tmp\src\NAnt.Core\Tasks\IfTask.cs:line 335
>    at NAnt.Core.Task.Execute() in C:\Documents and Settings\drieseng\Local
Settings\Temp\tmp2267.tmp\src\NAnt.Core\Task.cs:line 177
>    at NAnt.Core.Project.InitializeProjectDocument(XmlDocument doc) in
C:\Documents and Settings\drieseng\Local
Settings\Temp\tmp2267.tmp\src\NAnt.Core\Project.cs:line 1309
>    at NAnt.Core.Project.Execute() in C:\Documents and
Settings\drieseng\Local
Settings\Temp\tmp2267.tmp\src\NAnt.Core\Project.cs:line 824
>    at NAnt.Core.Project.Run() in C:\Documents and Settings\drieseng\Local
Settings\Temp\tmp2267.tmp\src\NAnt.Core\Project.cs:line 903
>
> Please send bug report to [EMAIL PROTECTED]
>
> ====================================
>
> The actual problem is the '-' in the capture name 'msi-id'.  'msiid" and
'msi_id' work, but not 'msi-id'.
>
> The Microsoft documentation for the regular expression naming constructs
disallows "punctuation" in the names.  So, apparently, a hyphen counts as
punctuation, but an underscore doesn't.  So be it.  I'll change the name.
>
> However, NAnt should not have freaked out on the syntax error to the point
of printing a stack trace and urging the user to send in a bug report to the
(closed) developers' mailing list.
>
> In the case of processing the <regex> task (with its unusual arguments),
NAnt should catch a System.ArgumentException, report it's message, then
simply terminate as with any other syntax error.
>
> Merrill
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by OSTG. Have you noticed the changes on
> Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
> one more big change to announce. We are now OSTG- Open Source Technology
> Group. Come see the changes on the new OSTG site. www.ostg.com
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users
>



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to