Am 20.02.2012 19:02, schrieb H. S. Teoh:
Exactly! Just because you use a Variant doesn't magically free you from
needing to know what exactly is that exception that you caught in the
first place. To make any sense of what's stored in the Variant, you
still have to know what is the exception type, and based on the type
interpret the Variant. So you end up with:

        catch(Exception e) {
                switch(e.type) {
                        case BlahException:
                                handleBlahException(e.data.blah_info);
                                break;
                        case BlehException:
                                handleBlehException(e.data.bleh_info);
                                break;
                        case BluhException:
                                handleBluhException(e.data.bluh_info);
                                break;
                        ...
                }
        }

Thx Teoh - i also don't know how Andreis Variant[string] would help here in any way

Reply via email to