![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | $error weird behaviour in RC2 ? Hello, while "poking around" with RC2, I found a strange behaviour (bug ?) with $error, but it might be somewhere else. Steps to reproduce (at least on my machine ;-)): - Launch PS - $error (obviously it's empty) - run a get-help command such as "help gps" or "get-help get-process -full" - $error It prints many rows of: "Cannot convert value "named" to type "System.Int32". Error: "Input string was not in a correct format." At line:1 char:64" What's wrong ? Can anyone confirm the same behaviour ? Thanks Ciao! Claudio |
My System Specs![]() |
| | #2 (permalink) |
| | RE: $error weird behaviour in RC2 ? I can confirm what you are seeing on my system. It seems that all these errors come from the section MamlParameterControl in C:\WINDOWS\system32\WindowsPowerShell\v1.0\help.format.ps1xml. The error seems to be that $_.position in the script contains the string "named" instead of a valid integer. + (($_.position -ne $()) -and ($_.position -ne "") -and ([int]$_.p <<<< osition -ne $())) This would give the same error message: PS> [int]"named" Cannot convert value "named" to type "System.Int32". I think it's a bug and not a feature. ![]() -- greetings dreeschkind "ClaudioG64" wrote: > Hello, > while "poking around" with RC2, I found a strange behaviour (bug ?) > with $error, but it might be somewhere else. > > Steps to reproduce (at least on my machine ;-)): > > - Launch PS > - $error > (obviously it's empty) > - run a get-help command such as > "help gps" or "get-help get-process -full" > - $error > > It prints many rows of: > "Cannot convert value "named" to type "System.Int32". Error: "Input > string was not in a correct format." > At line:1 char:64" > > What's wrong ? Can anyone confirm the same behaviour ? > > Thanks > > Ciao! > Claudio > > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: $error weird behaviour in RC2 ? dreeschkind ha scritto: > > I think it's a bug and not a feature. ![]() > :-D Just in case ... I filed a "bug" for this feature ;-) Claudio |
My System Specs![]() |
| | #4 (permalink) |
| | Re: $error weird behaviour in RC2 ? thats so interest dreeschkind for i want replicating that same line from the XML in my code to render maml help to html and say that the [int] cast gave me that named error, so i had to adapt mine, i was wondering why theirs didn't bomb, but they must have a trap, but are logging the error, but not surfacing errors that happenin the formatting xml. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Windows mail - weird behaviour with error message | Vista file management | |||
| Security Center weird behaviour | Vista security | |||
| Vista - weird DNS behaviour | Vista networking & sharing | |||
| Weird Visa behaviour | Vista General | |||
| Hashtable with array as a key .... weird behaviour | PowerShell | |||