Added reasons to assertions
This commit is contained in:
1 parent
1b0218c9f3
commit
a5b36fb24a
79 files changed
+359
-291
No files matched your search
@@ -32,7 +32,7 @@ namespace Dawn {
|
||||
* @param callback Callback method that invokes back.
|
||||
*/
|
||||
EventListener(T *instance, void (T::*callback)(A... args)) {
|
||||
assertNotNull(instance);
|
||||
assertNotNull(instance, "EventListener::EventListener: Instance cannot be null");
|
||||
|
||||
this->instance = instance;
|
||||
this->callback = callback;
|
||||
@@ -64,10 +64,10 @@ namespace Dawn {
|
||||
T *instance,
|
||||
void (T::*callback)(A... args)
|
||||
) {
|
||||
assertNotNull(instance);
|
||||
assertNotNull(instance, "Event::addListener: Instance cannot be null");
|
||||
|
||||
auto listener = new EventListener<T,A...>(instance, callback);
|
||||
assertNotNull(listener);
|
||||
assertNotNull(listener, "Event::addListener: Listener could not be created (Memory filled?)");
|
||||
this->listeners.push_back(listener);
|
||||
return listener;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user