;;; TOOL: wat2wasm
;;; FLAGS: --enable-exceptions -v
;;; ERROR: 1
(module
  (except $ex i32)
  (func (result i32)
    (try $try1 (result i32)
      (nop)
      (rethrow $try1)
      (catch $ex
        (nop)
      )
    )
  )
) 
(;; STDERR ;;;
out/test/exceptions/rethrow-not-in-catch.txt:9:8: error: Rethrow not in try catch block
      (rethrow $try1)
       ^^^^^^^
;;; STDERR ;;)
