# .skip. # Cobra gives more informative InvalidCastExceptions than Mono or .NET which do not report the source type, destination type or value.toString--which is annoying class Foo def main is shared a = true to Object expect InvalidCastException b = a to int try b = a to int catch exc as InvalidCastException s = exc.toString.toLower # Cannot cast from source type to destination type. Source type is "bool". Destination type is "int". Value = true assert 'cannot cast' in s assert 'source type is "bool"' in s assert 'destination type is "int"' in s assert 'value = true' in s CobraCore.noOp(b)