Browse Forum Posts by Tags

Showing related tags and posts for the Forums application. See all tags in the site
  • Trouble with Try/Catch

    I'm trying to work out how to specify the Catch values for PowerShell V2 CTP3's Try/Catch stuff. Here's a simple divide by zero error that I'm trying to catch: <# .SYNOPSIS Demonstrates try/catch/finally in V2 .DESCRIPTION Shows a simple example of the try/catch/finally syntax introduced...
    Posted to Using Scripts (Forum) by Thomas Lee on 12-29-2008
    Filed under: PowerShell V2, error handling, try/catch
  • Re: Trouble with Try/Catch

    See this help file: about_Try_Catch_Finally $one=1 $zero=0 try{ $one/$zero } catch [System.DivideByZeroException]{ #"The first Catch script block handles System.DivideByZeroException exceptions" "Attempted to divide by zero" } catch { "the second Catch script block handles any...
    Posted to Using Scripts (Forum) by Shay Levy on 12-30-2008
    Filed under: PowerShell V2, error handling, try/catch
  • Re: Trouble with Try/Catch

    This is very good info, but I'm lost when it comes to dealing with COM object exceptions inside PowerShell. Some are rather simple, for example, I've registered a DLL (e.g. KiXtart.DLL which comes with KiXtart 4.60). I can invoke the interface as an object in VBScript and JScript fine. It works...
    Posted to Using Scripts (Forum) by skatterbrainz on 05-07-2009
    Filed under: PowerShell V2, error handling, try/catch, kixtart
  • Deep Dive: Error Handling – Error Types (part 1)

    By Steven Murawski To deal with this issue and to provide additional output options, PowerShell employs the concept of streams. There are three additional streams (other than the primary pipeline stream) available in PowerShell – Verbose, Warning, ... Read More
    Posted to General (Forum) by ps2 on 07-27-2009
    Filed under: Error Handling
  • Script Review: Error Handling and Event Logging Template

    I believe I have a useful script for new powershell scripters. It's a template/wrapper for a script that handles error trapping and event logging. It seems to work but probably is inelegant. Feel free to share this or anything you ... Read More
    Posted to General (Forum) by ps2 on 11-04-2009
    Filed under: Error Handling, Event Logging
  • Error handling in PowerShell

    Jeremy lead a discussion at the recent PowerShell UK User Group hosted by Richard Siddaway on error handling. Read more
    Posted to General (Forum) by ps2 on 01-29-2009
    Filed under: Error Handling
Page 1 of 1 (6 items)
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.