Question: Catching an error

I'm trying to trap the exception generated when the member operator (:-) is used with a variable that is not a module. I thought the following would work:
restart;
proc()
    try
        NotAModule:-mem();
    catch "`NotAModule` does not evaluate to a module":
        print("it worked")
    catch:
        print("it failed");
        print(StringTools:-FormatMessage(lastexception[2..-1]));
    end try
end proc();
                                  "it failed"

                 "`NotAModule` does not evaluate to a module"
Any ideas how to fix this? The generated exception string should match the first catch statement.
Please Wait...