Index: tests/contains.test =================================================================== diff -u -rf5bba52ec263179be12a65a00a7d4f2282c445d2 -ra2c877c7dd15b66e27dd85c9c17744670474d132 --- tests/contains.test (.../contains.test) (revision f5bba52ec263179be12a65a00a7d4f2282c445d2) +++ tests/contains.test (.../contains.test) (revision a2c877c7dd15b66e27dd85c9c17744670474d132) @@ -63,6 +63,32 @@ }] # +# error and errorcode propagation from within contains +# + +Class create Arbre +? {catch {Arbre create root { + :contains { + Arbre create level1 { + :contains { + Arbre level2 + } + } + } +}} msg opts; set msg} "method 'level2' unknown for ::Arbre; in order to create an instance of class ::Arbre, consider using '::Arbre create level2 ?...?'" + +Class create Arbre +? {catch {Arbre create root { + :contains { + Arbre create level1 { + :contains { + return -code error -errorcode MYERR + } + } + } +}} msg opts; dict get $opts -errorcode} "MYERR" + +# # Test resolving next without namespace import/path # namespace path ""