![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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) |
| | Info: Can you clear $error? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Can you clear $error? $error.clear() |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Can you clear $error? $error.clear... who woulda figured. "Brandon Shell" <tshell.mask@gmail.com> wrote in message news:uUjfCahxGHA.800@TK2MSFTNGP06.phx.gbl... > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Can you clear $error? In fact, if you already have populated error, you can explore what to do with it pretty easily: $error | Get-Member $error.PSBase | Get-Member "Brandon Shell" <tshell.mask@gmail.com> wrote in message news:uB4QRfhxGHA.3264@TK2MSFTNGP03.phx.gbl... > $error.clear... who woulda figured. > > "Brandon Shell" <tshell.mask@gmail.com> wrote in message > news:uUjfCahxGHA.800@TK2MSFTNGP06.phx.gbl... >> >> > > |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Info: Can you clear $error? On Tue, 22 Aug 2006 14:12:18 -0400, "Brandon Shell" <tshell.mask@gmail.com> wrote: > Hi, Yes you can. Run this in RC2 $Count = $Error.Count Then run this: $Error.RemoveRange(0,$Count) $Error.Count is now 0. Andrew Watt MVP |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Info: Can you clear $error? Andrew Watt [MVP] wrote: > On Tue, 22 Aug 2006 14:12:18 -0400, "Brandon Shell" > <tshell.mask@gmail.com> wrote: > > > > > Hi, > > Yes you can. > > Run this in RC2 > > $Count = $Error.Count > > Then run this: > > $Error.RemoveRange(0,$Count) > > $Error.Count is now 0. > > Andrew Watt MVP Are there any differences between using "$Error.RemoveRange(...)" and "$Error.Clear()"? I think "Clear()" seems to do the job for me though. I would appreciate it if there are any subtle differences between those two. |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Info: Can you clear $error? Sung M Kim wrote: > Andrew Watt [MVP] wrote: >> On Tue, 22 Aug 2006 14:12:18 -0400, "Brandon Shell" >> <tshell.mask@gmail.com> wrote: >> > Are there any differences between using "$Error.RemoveRange(...)" and > "$Error.Clear()"? > I think "Clear()" seems to do the job for me though. > I would appreciate it if there are any subtle differences between those > two. If you want to clear it, then using .Clear() is almost certainly the best way to go. It should be functionally equivalent to using RemoveRange(), but using Clear() is shorter, more intuitive, and probably more efficient (in a too-small to notice way, though). :-) |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Unable to clear "deleted items" with error message?! | Vista mail | |||
| doesnt work!!entered incoming and outgoing info as copied! ERROR! | Vista mail | |||
| clear database error | .NET General | |||
| error message sent again but with different info on | Vista mail | |||
| Explorer crashes w/ error info | Vista performance & maintenance | |||