     test "expects one or two args for catch clauses" do
       assert_raise CompileError, ~r"expected one or two args for catch clauses \(->\) in try", fn ->
         expand(quote do: (try do x catch _, _, _ -> :ok end))
+      end
+    end
+
+    test "expects clauses for rescue, else, catch" do
+      assert_raise CompileError, ~r"expected -> clauses for rescue in try", fn ->
+        expand(quote do: (try do e rescue x end))
+      end
+
+      assert_raise CompileError, ~r"expected -> clauses for catch in try", fn ->
+        expand(quote do: (try do e catch x end))
+      end
+
+      assert_raise CompileError, ~r"expected -> clauses for else in try", fn ->
+        expand(quote do: (try do e else x end))
       end
     end
   end

             quote do: (case w() do x -> x = x; y -> y = y end; :erlang.+(x, y))
    end

    test "expects at most one do" do
      assert_raise CompileError, ~r"duplicated do clauses given for case", fn ->
        expand(quote(do: (case e, do: (x -> x), do: (y -> y))))
      end
    end
  end

             quote do: (receive do x -> x = x after y() -> y(); w = y() end; :erlang.+(x, w))
    end

    test "expects exactly one do or after" do
      assert_raise CompileError, ~r"missing do or after keyword in receive", fn ->
        expand(quote do: (receive []))
      end

      assert_raise CompileError, ~r"duplicated do clauses given for receive", fn ->
        expand(quote(do: (receive do: (x -> x), do: (y -> y))))
      end

      assert_raise CompileError, ~r"duplicated after clauses given for receive", fn ->
        expand(quote(do: (receive do x -> x after y -> y after z -> z end)))
      end
    end

    test "expects clauses" do
      assert_raise CompileError, ~r"expected -> clauses for do in receive", fn ->
        expand(quote do: (receive do x end))
      end
    end

    test "expects on argument for do/after clauses" do
      assert_raise CompileError, ~r"expected one arg for do clauses \(->\) in receive", fn ->
        expand(quote do: (receive do _, _ -> :ok end))
      end

      assert_raise CompileError, ~r"expected one arg for after clauses \(->\) in receive", fn ->
        expand(quote do: (receive do x -> x after _, _ -> :ok end))
      end
    end

    test "expects a single clause for \"after\"" do
      assert_raise CompileError, ~r"expected a single -> clause for after in receive", fn ->
        expand(quote do: (receive do x -> x after 1 -> y; 2 -> z end))
      end
    end

    test "raises for invalid arguments" do
      assert_raise CompileError, ~r"invalid arguments for receive", fn ->
        expand(quote do: (receive :foo))
      end
    end

    test "raises with invalid keywords" do
      assert_raise CompileError, ~r"unexpected keyword foo in receive", fn ->
        expand(quote do: (receive do: (x -> x), foo: :bar))
      end
    end
  end
