-
Notifications
You must be signed in to change notification settings - Fork 3
2017 API dlibrary.utility.OnErrorDoAndRetry
Dieter Geerts edited this page Sep 24, 2016
·
1 revision
Decorator for lazy-initialization, as an exception can occur because of missing stuff.
Sometimes, we want some initialization to be ran only when it's needed. This initialization will set our things on the instance or class. This decorator can be set on functions/properties that depends on these things. When they aren't available yet, an error will occur, thus actually saying that initialization isn't done yet. When this happen, we will run the handler function, with the same arguments, and try the function again.
- object The most base type
__init__(self, error: Exception, handler: '(*args, **kwargs) ->
None')