Header menu logo Fabulous.AST

TryWithBuilders Module

Type extensions

Type extension Description

Ast.TryWithExpr(value, clauses)

Full Usage: Ast.TryWithExpr(value, clauses)

Parameters:
Returns: WidgetBuilder<Expr>

Create a try-with expression.

Extended Type: Ast

value : WidgetBuilder<Expr>

The expression to try.

clauses : WidgetBuilder<MatchClauseNode> list

The match clauses for exception handling.

Returns: WidgetBuilder<Expr>

Ast.TryWithExpr(value, clauses)

Full Usage: Ast.TryWithExpr(value, clauses)

Parameters:
Returns: WidgetBuilder<Expr>

Create a try-with expression with a constant value.

Extended Type: Ast

value : WidgetBuilder<Constant>

The constant value to try.

clauses : WidgetBuilder<MatchClauseNode> list

The match clauses for exception handling.

Returns: WidgetBuilder<Expr>

Ast.TryWithExpr(value, clauses)

Full Usage: Ast.TryWithExpr(value, clauses)

Parameters:
Returns: WidgetBuilder<Expr>

Create a try-with expression with a string literal value.

Extended Type: Ast

value : string

The string literal to try.

clauses : WidgetBuilder<MatchClauseNode> list

The match clauses for exception handling.

Returns: WidgetBuilder<Expr>

Ast.TryWithExpr(value, exceptionName, handler)

Full Usage: Ast.TryWithExpr(value, exceptionName, handler)

Parameters:
    value : WidgetBuilder<Expr> - The expression to try.
    exceptionName : string - The name to bind the exception to.
    handler : WidgetBuilder<Expr> - The expression to handle the exception.

Returns: WidgetBuilder<Expr>

Create a try-with expression with a single match clause for catching all exceptions.

Extended Type: Ast

value : WidgetBuilder<Expr>

The expression to try.

exceptionName : string

The name to bind the exception to.

handler : WidgetBuilder<Expr>

The expression to handle the exception.

Returns: WidgetBuilder<Expr>

Ast.TryWithExpr(value, exceptionName, handler)

Full Usage: Ast.TryWithExpr(value, exceptionName, handler)

Parameters:
    value : WidgetBuilder<Constant> - The constant value to try.
    exceptionName : string - The name to bind the exception to.
    handler : WidgetBuilder<Expr> - The expression to handle the exception.

Returns: WidgetBuilder<Expr>

Create a try-with expression with a constant value and a single match clause for catching all exceptions.

Extended Type: Ast

value : WidgetBuilder<Constant>

The constant value to try.

exceptionName : string

The name to bind the exception to.

handler : WidgetBuilder<Expr>

The expression to handle the exception.

Returns: WidgetBuilder<Expr>

Ast.TryWithExpr(value, exceptionName, handler)

Full Usage: Ast.TryWithExpr(value, exceptionName, handler)

Parameters:
    value : string - The string literal to try.
    exceptionName : string - The name to bind the exception to.
    handler : WidgetBuilder<Expr> - The expression to handle the exception.

Returns: WidgetBuilder<Expr>

Create a try-with expression with a string literal value and a single match clause for catching all exceptions.

Extended Type: Ast

value : string

The string literal to try.

exceptionName : string

The name to bind the exception to.

handler : WidgetBuilder<Expr>

The expression to handle the exception.

Returns: WidgetBuilder<Expr>

Type something to start searching.