###############################################################################
#
# try2.eagle --
#
# Extensible Adaptable Generalized Logic Engine (Eagle)
#
# Copyright (c) 2007-2012 by Joe Mistachkin.  All rights reserved.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: $
#
###############################################################################

source [file join [file normalize [file dirname [info script]]] prologue.eagle]

###############################################################################

runTest {test try-3.1 {try/catch/error/finally} -setup {
  unset -nocomplain x z
} -body {
  list [catch {
    try {
      lappend z try_before
      catch {unset x}
      error "this is a 'try' error."
      lappend z try_after
    } finally {
      lappend z finally_before
      catch {unset x}
      lappend z finally_after
    }
  } error] $error $z
} -cleanup {
  unset -nocomplain z error
} -constraints {eagle} -result {1 {this is a 'try' error.}\
{try_before finally_before finally_after}}}

###############################################################################

source [file join [file normalize [file dirname [info script]]] epilogue.eagle]
