Skip to content

Commit e4ed532

Browse files
committed
py: exception: bodge to return Exception.args
1 parent 3a20288 commit e4ed532

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

py/exception.go

+5
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,11 @@ func IsException(exception *Type, r interface{}) bool {
305305
return t.IsSubtype(exception)
306306
}
307307

308+
// FIXME prototype __getattr__ before we do introspection!
309+
func (e *Exception) M__getattr__(name string) Object {
310+
return e.Args // FIXME All attributes are args!
311+
}
312+
308313
// Check Interfaces
309314
var _ error = (*Exception)(nil)
310315
var _ error = (*ExceptionInfo)(nil)

0 commit comments

Comments
 (0)