TryStatement

Overview

A try/finally/except or try/except/finally statement. The try statement executes the body and will trigger the finally block in all cases, the except block is executed when the body of the try statement fails. When both except and finally are passed, the order they are passed in define which one will be called first.

Location


 

constructor

Initialize an empty try statement

 

constructor

 

TryStatement()

 

init()

 

TryStatement()

 

Sub New()

constructor (Statement, Statement)

Initialize a new try statement

 

constructor(aBody: Statement; aFinallyBody: Statement)

 

TryStatement(Statement aBody, Statement aFinallyBody)

 

init(_ aBody: Statement, _ aFinallyBody: Statement)

 

TryStatement(Statement aBody, Statement aFinallyBody)

 

Sub New(aBody As Statement, aFinallyBody As Statement)

Parameters:

  • aBody: Try body
  • aFinallyBody: Finally statement

Initialize a new try statement

 

constructor(aBody: Statement; aFinallyBody: Statement; anExceptBody: ExceptStatement)

 

TryStatement(Statement aBody, Statement aFinallyBody, ExceptStatement anExceptBody)

 

init(_ aBody: Statement, _ aFinallyBody: Statement, _ anExceptBody: ExceptStatement)

 

TryStatement(Statement aBody, Statement aFinallyBody, ExceptStatement anExceptBody)

 

Sub New(aBody As Statement, aFinallyBody As Statement, anExceptBody As ExceptStatement)

Parameters:

  • aBody: Try body
  • aFinallyBody: Finally statement
  • anExceptBody: Except body (runs after finally)

constructor (Statement, ExceptStatement)

Initialize a new try statement

 

constructor(aBody: Statement; anExceptBody: ExceptStatement)

 

TryStatement(Statement aBody, ExceptStatement anExceptBody)

 

init(_ aBody: Statement, _ anExceptBody: ExceptStatement)

 

TryStatement(Statement aBody, ExceptStatement anExceptBody)

 

Sub New(aBody As Statement, anExceptBody As ExceptStatement)

Parameters:

  • aBody: Try body
  • anExceptBody: Except body

Initialize a new try statement

 

constructor(aBody: Statement; anExceptBody: ExceptStatement; aFinallyBody: Statement)

 

TryStatement(Statement aBody, ExceptStatement anExceptBody, Statement aFinallyBody)

 

init(_ aBody: Statement, _ anExceptBody: ExceptStatement, _ aFinallyBody: Statement)

 

TryStatement(Statement aBody, ExceptStatement anExceptBody, Statement aFinallyBody)

 

Sub New(aBody As Statement, anExceptBody As ExceptStatement, aFinallyBody As Statement)

Parameters:

  • aBody: Try body
  • anExceptBody: Except body (runs before finally)
  • aFinallyBody: Finally statement

Body

Body of the Try statement

 

property Body: Statement read write;

 

Statement Body { get; set; }

 

var Body: Statement { get{} set{} }

 

Statement Body { __get; __set; }

 

Property Body() As Statement

BuildStatement

Converts a statement to a string.

 

method BuildStatement(anIndent: Int32; sb: StringBuilder)

 

void BuildStatement(Int32 anIndent, StringBuilder sb)

 

func BuildStatement(_ anIndent: Int32, _ sb: StringBuilder)

 

void BuildStatement(Int32 anIndent, StringBuilder sb)

 

Sub BuildStatement(anIndent As Int32, sb As StringBuilder)

Parameters:

  • anIndent: The nr of spaces to place before the start of this statement.
  • sb: Output string builder.

Except

Except body

 

property Except: ExceptStatement read write;

 

ExceptStatement Except { get; set; }

 

var Except: ExceptStatement { get{} set{} }

 

ExceptStatement Except { __get; __set; }

 

Property Except() As ExceptStatement

Finally

Finally statement. Finally is executed before Except (if any)

 

property Finally: Statement read write;

 

Statement Finally { get; set; }

 

var Finally: Statement { get{} set{} }

 

Statement Finally { __get; __set; }

 

Property Finally() As Statement

FinallyAfter

Finally statement. Ignored if Finally is set, executed after Except

 

property FinallyAfter: Statement read write;

 

Statement FinallyAfter { get; set; }

 

var FinallyAfter: Statement { get{} set{} }

 

Statement FinallyAfter { __get; __set; }

 

Property FinallyAfter() As Statement

Kind

Returns what kind of statement this is; this can be used to find out if a statement is of a specific type without having to check all possible casts

 

property Kind: StatementKind read;

 

StatementKind Kind { get; }

 

var Kind: StatementKind { get{} }

 

StatementKind Kind { __get; }

 

ReadOnly Property Kind() As StatementKind

OverflowCheck    (declared in Statement)

Overflow checking for binary and unary operations in this statement

 

property OverflowCheck: Boolean read write;

 

Boolean OverflowCheck { get; set; }

 

var OverflowCheck: Boolean { get{} set{} }

 

Boolean OverflowCheck { __get; __set; }

 

Property OverflowCheck() As Boolean

Position    (declared in Statement)

Position this statement is defined at

 

property Position: IPosition read write;

 

IPosition Position { get; set; }

 

var Position: IPosition { get{} set{} }

 

IPosition Position { __get; __set; }

 

Property Position() As IPosition

SetOverflowCheckRecursive (Boolean)

 

method SetOverflowCheckRecursive(aValue: Boolean)

 

void SetOverflowCheckRecursive(Boolean aValue)

 

func SetOverflowCheckRecursive(_ aValue: Boolean)

 

void SetOverflowCheckRecursive(Boolean aValue)

 

Sub SetOverflowCheckRecursive(aValue As Boolean)

Parameters:

  • aValue:

SetOverflowCheckRecursive (Boolean)    (declared in Statement)

Recursively sets the OverflowCheck flag

 

method SetOverflowCheckRecursive(value: Boolean)

 

void SetOverflowCheckRecursive(Boolean value)

 

func SetOverflowCheckRecursive(_ value: Boolean)

 

void SetOverflowCheckRecursive(Boolean value)

 

Sub SetOverflowCheckRecursive(value As Boolean)

Parameters:

  • value: new value

ToString    (declared in Statement)

Returns this statement as a string

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

ToValue

Converts this statement to a value tree that creates these statements

 

method ToValue(aServicesParameter: Value; aServices: IServices): Value

 

Value ToValue(Value aServicesParameter, IServices aServices)

 

func ToValue(_ aServicesParameter: Value, _ aServices: IServices) -> Value

 

Value ToValue(Value aServicesParameter, IServices aServices)

 

Function ToValue(aServicesParameter As Value, aServices As IServices) As Value

Parameters:

  • aServicesParameter: the value that contains where aServices is stored
  • aServices: Actual services instance.

 

Body

Body of the Try statement

 

property Body: Statement read write;

 

Statement Body { get; set; }

 

var Body: Statement { get{} set{} }

 

Statement Body { __get; __set; }

 

Property Body() As Statement

Except

Except body

 

property Except: ExceptStatement read write;

 

ExceptStatement Except { get; set; }

 

var Except: ExceptStatement { get{} set{} }

 

ExceptStatement Except { __get; __set; }

 

Property Except() As ExceptStatement

Finally

Finally statement. Finally is executed before Except (if any)

 

property Finally: Statement read write;

 

Statement Finally { get; set; }

 

var Finally: Statement { get{} set{} }

 

Statement Finally { __get; __set; }

 

Property Finally() As Statement

FinallyAfter

Finally statement. Ignored if Finally is set, executed after Except

 

property FinallyAfter: Statement read write;

 

Statement FinallyAfter { get; set; }

 

var FinallyAfter: Statement { get{} set{} }

 

Statement FinallyAfter { __get; __set; }

 

Property FinallyAfter() As Statement

Kind

Returns what kind of statement this is; this can be used to find out if a statement is of a specific type without having to check all possible casts

 

property Kind: StatementKind read;

 

StatementKind Kind { get; }

 

var Kind: StatementKind { get{} }

 

StatementKind Kind { __get; }

 

ReadOnly Property Kind() As StatementKind

OverflowCheck    (declared in Statement)

Overflow checking for binary and unary operations in this statement

 

property OverflowCheck: Boolean read write;

 

Boolean OverflowCheck { get; set; }

 

var OverflowCheck: Boolean { get{} set{} }

 

Boolean OverflowCheck { __get; __set; }

 

Property OverflowCheck() As Boolean

Position    (declared in Statement)

Position this statement is defined at

 

property Position: IPosition read write;

 

IPosition Position { get; set; }

 

var Position: IPosition { get{} set{} }

 

IPosition Position { __get; __set; }

 

Property Position() As IPosition

 

constructor

Initialize an empty try statement

 

constructor

 

TryStatement()

 

init()

 

TryStatement()

 

Sub New()

constructor (Statement, Statement)

Initialize a new try statement

 

constructor(aBody: Statement; aFinallyBody: Statement)

 

TryStatement(Statement aBody, Statement aFinallyBody)

 

init(_ aBody: Statement, _ aFinallyBody: Statement)

 

TryStatement(Statement aBody, Statement aFinallyBody)

 

Sub New(aBody As Statement, aFinallyBody As Statement)

Parameters:

  • aBody: Try body
  • aFinallyBody: Finally statement

Initialize a new try statement

 

constructor(aBody: Statement; aFinallyBody: Statement; anExceptBody: ExceptStatement)

 

TryStatement(Statement aBody, Statement aFinallyBody, ExceptStatement anExceptBody)

 

init(_ aBody: Statement, _ aFinallyBody: Statement, _ anExceptBody: ExceptStatement)

 

TryStatement(Statement aBody, Statement aFinallyBody, ExceptStatement anExceptBody)

 

Sub New(aBody As Statement, aFinallyBody As Statement, anExceptBody As ExceptStatement)

Parameters:

  • aBody: Try body
  • aFinallyBody: Finally statement
  • anExceptBody: Except body (runs after finally)

constructor (Statement, ExceptStatement)

Initialize a new try statement

 

constructor(aBody: Statement; anExceptBody: ExceptStatement)

 

TryStatement(Statement aBody, ExceptStatement anExceptBody)

 

init(_ aBody: Statement, _ anExceptBody: ExceptStatement)

 

TryStatement(Statement aBody, ExceptStatement anExceptBody)

 

Sub New(aBody As Statement, anExceptBody As ExceptStatement)

Parameters:

  • aBody: Try body
  • anExceptBody: Except body

Initialize a new try statement

 

constructor(aBody: Statement; anExceptBody: ExceptStatement; aFinallyBody: Statement)

 

TryStatement(Statement aBody, ExceptStatement anExceptBody, Statement aFinallyBody)

 

init(_ aBody: Statement, _ anExceptBody: ExceptStatement, _ aFinallyBody: Statement)

 

TryStatement(Statement aBody, ExceptStatement anExceptBody, Statement aFinallyBody)

 

Sub New(aBody As Statement, anExceptBody As ExceptStatement, aFinallyBody As Statement)

Parameters:

  • aBody: Try body
  • anExceptBody: Except body (runs before finally)
  • aFinallyBody: Finally statement

BuildStatement

Converts a statement to a string.

 

method BuildStatement(anIndent: Int32; sb: StringBuilder)

 

void BuildStatement(Int32 anIndent, StringBuilder sb)

 

func BuildStatement(_ anIndent: Int32, _ sb: StringBuilder)

 

void BuildStatement(Int32 anIndent, StringBuilder sb)

 

Sub BuildStatement(anIndent As Int32, sb As StringBuilder)

Parameters:

  • anIndent: The nr of spaces to place before the start of this statement.
  • sb: Output string builder.

SetOverflowCheckRecursive (Boolean)

 

method SetOverflowCheckRecursive(aValue: Boolean)

 

void SetOverflowCheckRecursive(Boolean aValue)

 

func SetOverflowCheckRecursive(_ aValue: Boolean)

 

void SetOverflowCheckRecursive(Boolean aValue)

 

Sub SetOverflowCheckRecursive(aValue As Boolean)

Parameters:

  • aValue:

SetOverflowCheckRecursive (Boolean)    (declared in Statement)

Recursively sets the OverflowCheck flag

 

method SetOverflowCheckRecursive(value: Boolean)

 

void SetOverflowCheckRecursive(Boolean value)

 

func SetOverflowCheckRecursive(_ value: Boolean)

 

void SetOverflowCheckRecursive(Boolean value)

 

Sub SetOverflowCheckRecursive(value As Boolean)

Parameters:

  • value: new value

ToString    (declared in Statement)

Returns this statement as a string

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

ToValue

Converts this statement to a value tree that creates these statements

 

method ToValue(aServicesParameter: Value; aServices: IServices): Value

 

Value ToValue(Value aServicesParameter, IServices aServices)

 

func ToValue(_ aServicesParameter: Value, _ aServices: IServices) -> Value

 

Value ToValue(Value aServicesParameter, IServices aServices)

 

Function ToValue(aServicesParameter As Value, aServices As IServices) As Value

Parameters:

  • aServicesParameter: the value that contains where aServices is stored
  • aServices: Actual services instance.