Windows Vista Forums

WOW! try/catch/finally has been implemented and will be available in next drop.
  1. #1


    Roman Kuzmin Guest

    WOW! try/catch/finally has been implemented and will be available in next drop.

    Hi All,

    Look at this:
    "try/catch/finally has been implemented and will be available in next
    drop.":
    https://connect.microsoft.com/feedba...3811&SiteID=99

    It's a very good news (though perhaps it was not something vitally needed).

    Are there any details available about this? What scope do try \ catch \
    finally blocks use?



    Legacy (?) trap uses a new scope and some people find this inconvenient:
    https://connect.microsoft.com/feedba...4294&SiteID=99

    --
    Thanks,
    Roman Kuzmin

    http://code.google.com/p/farnet/
    PowerShell and .NET in Far Manager



      My System SpecsSystem Spec

  2. #2


    Marco Shaw [MVP] Guest

    Re: WOW! try/catch/finally has been implemented and will be availablein next drop.


    > Are there any details available about this? What scope do try \ catch \
    > finally blocks use?
    Nothing was released until a few days before the last v2 CTP drop, so
    I'd keep an eye on the PSH team blog, and when you start seeing official
    announcements about the next drop, you'll know it's coming shortly.

    Marco

    --
    Microsoft MVP - Windows PowerShell
    http://www.microsoft.com/mvp

    PowerGadgets MVP
    http://www.powergadgets.com/mvp

    Blog:
    http://marcoshaw.blogspot.com

      My System SpecsSystem Spec

  3. #3


    Bruce Payette [MSFT] Guest

    Re: WOW! try/catch/finally has been implemented and will be available in next drop.

    Like all PowerShell control structures, try/catch will execute in the
    current scope:

    PS (MTA) (1) >
    $x=13; try { $x++ } finally { $x++ }; $x
    15

    Note: if you want to create a nested scope, you can always do
    & { ... }

    This works anywhere...

    -bruce

    --
    Bruce Payette [MSFT]
    Principal Developer, Windows PowerShell
    Microsoft Corporation
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Visit the Windows PowerShell Team blog at:
    http://blogs.msdn.com/PowerShell
    Visit the Windows PowerShell ScriptCenter at:
    http://www.microsoft.com/technet/scr.../hubs/msh.mspx
    My Book: http://manning.com/powershell

    "Roman Kuzmin" <z@xxxxxx> wrote in message
    news:16CCC3E9-52AD-4F40-B550-46AC97B4B905@xxxxxx

    > Hi All,
    >
    > Look at this:
    > "try/catch/finally has been implemented and will be available in next
    > drop.":
    > https://connect.microsoft.com/feedba...3811&SiteID=99
    >
    > It's a very good news (though perhaps it was not something vitally
    > needed).
    >
    > Are there any details available about this? What scope do try \ catch \
    > finally blocks use?
    >
    > Legacy (?) trap uses a new scope and some people find this inconvenient:
    > https://connect.microsoft.com/feedba...4294&SiteID=99
    >
    > --
    > Thanks,
    > Roman Kuzmin
    >
    > http://code.google.com/p/farnet/
    > PowerShell and .NET in Far Manager
    >
    >


      My System SpecsSystem Spec

  4. #4


    Roman Kuzmin Guest

    Re: WOW! try/catch/finally has been implemented and will be available in next drop.

    Hi Bruce,

    thank you for the answer and yet another good news in it.

    --
    Thanks,
    Roman Kuzmin

    http://code.google.com/p/farnet/
    PowerShell and .NET in Far Manager


      My System SpecsSystem Spec

  5. #5


    Marco Shaw [MVP] Guest

    Re: WOW! try/catch/finally has been implemented and will be availablein next drop.

    Roman Kuzmin wrote:

    > Hi All,
    >
    > Look at this:
    > "try/catch/finally has been implemented and will be available in next
    > drop.":
    > https://connect.microsoft.com/feedba...3811&SiteID=99
    >
    >
    > It's a very good news (though perhaps it was not something vitally needed).
    >
    > Are there any details available about this? What scope do try \ catch \
    > finally blocks use?
    >
    > Legacy (?) trap uses a new scope and some people find this inconvenient:
    > https://connect.microsoft.com/feedba...4294&SiteID=99
    >
    >
    Bruce Payette announced this week at TechMentor that the next 2.0 CTP
    drop would be out on or about the week of MMS (end of April).

    Marco

    --
    Microsoft MVP - Windows PowerShell
    http://www.microsoft.com/mvp

    PowerGadgets MVP
    http://www.powergadgets.com/mvp

    Blog:
    http://marcoshaw.blogspot.com

      My System SpecsSystem Spec

  6. #6


    Bruce Payette [MSFT] Guest

    Re: WOW! try/catch/finally has been implemented and will be availa

    With the qualification that there is no hard guarantee here, yes - we're
    looking at delivering it around that time. More specific details will be
    released at MMS. (As always, we reserve the right to change the schedule as
    needed)

    And, as before, this is will be a CTP with features subject to change.
    Please do not deploy this in production environments :-)

    Thanks,
    -bruce [MSFT]
    Bruce Payette
    Principal Developer, Windows PowerShell Team
    Microsoft Corporation


    "Marco Shaw [MVP]" wrote:

    > Roman Kuzmin wrote:

    > > Hi All,
    > >
    > > Look at this:
    > > "try/catch/finally has been implemented and will be available in next
    > > drop.":
    > > https://connect.microsoft.com/feedba...3811&SiteID=99
    > >
    > >
    > > It's a very good news (though perhaps it was not something vitally needed).
    > >
    > > Are there any details available about this? What scope do try \ catch \
    > > finally blocks use?
    > >
    > > Legacy (?) trap uses a new scope and some people find this inconvenient:
    > > https://connect.microsoft.com/feedba...4294&SiteID=99
    > >
    > >
    >
    > Bruce Payette announced this week at TechMentor that the next 2.0 CTP
    > drop would be out on or about the week of MMS (end of April).
    >
    > Marco
    >
    > --
    > Microsoft MVP - Windows PowerShell
    > http://www.microsoft.com/mvp
    >
    > PowerGadgets MVP
    > http://www.powergadgets.com/mvp
    >
    > Blog:
    > http://marcoshaw.blogspot.com
    >

      My System SpecsSystem Spec

WOW! try/catch/finally has been implemented and will be available in next drop. problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Try catch finally is not recognized by powershell @lways PowerShell 3 06 Apr 2010
has anyone implemented a PS provider if so I need help Bob Landau PowerShell 4 17 Jun 2009
Windows 2008 GPO some parts are not implemented while others are Steefozo .NET General 1 19 Apr 2009
HTTP 501 Not Implemented RRTest Vista General 2 10 Mar 2007
OT: Why Aero was implemented on 3D? Fernando Vista General 9 27 Jul 2006