Package org.apache.groovy.contracts.generation

# Class TryCatchBlockGenerator

java.lang.Object
org.apache.groovy.contracts.generation.TryCatchBlockGenerator

public class TryCatchBlockGenerator extends Object
Creates a try-catch block around a given `AssertStatement` and catches a PowerAssertionError to reuse the generated visual output.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TryCatchBlockGenerator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static BlockStatement`
  `generateTryCatchBlock(ClassNode assertionErrorClass, String message, Statement assertStatement)`
  `static BlockStatement`
  `generateTryCatchBlockForInlineMode(ClassNode assertionErrorClass, String message, Statement assertStatement)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TryCatchBlockGenerator

    public TryCatchBlockGenerator()

- ## Method Details

  - ### generateTryCatchBlockForInlineMode

    public static BlockStatement generateTryCatchBlockForInlineMode(ClassNode assertionErrorClass, String message, Statement assertStatement)

  - ### generateTryCatchBlock

    public static BlockStatement generateTryCatchBlock(ClassNode assertionErrorClass, String message, Statement assertStatement)