Skip to content
Browse files

EventDrop fixes

  • Loading branch information...
1 parent 4fb701c commit 267296a76c887f27e3823c25099f87435f387080 @Boss32 committed Jan 18, 2012
View
5 library/SteelBot/EventDrop.php
@@ -1,5 +0,0 @@
-<?php
-
-class SteelBot_EventDrop extends Exception
-{
-}
View
8 library/SteelBot/EventManager.php
@@ -83,7 +83,6 @@ public function AddEventType($name)
/**
* Run Event
- * @todo EventDrop
* @param SteelBot_EventManager_Event $event Event
* @param bool $handledrop Catch EventDrop
* @return SteelBot_EventManager_Event
@@ -108,11 +107,12 @@ public function EventRun($event, $handledrop = true)
}
}
}
- } catch (SteelBot_EventDrop $ed) {
+ } catch (SteelBot_EventManager_EventDrop $event_drop) {
if ($handledrop) {
- ##slog::add('core', $ed->getMessage(), LOG_DROPPED_EVENT);
+ SteelBot::Log('EventDrop: ' . $event_drop->getMessage(), __CLASS__, Zend_Log::WARN);
} else {
- throw $ed;
+ // Retry EventDrop Exception
+ throw $event_drop;
}
}
}
View
9 library/SteelBot/EventManager/EventDrop.php
@@ -0,0 +1,9 @@
+<?php
+
+class SteelBot_EventManager_EventDrop extends Exception
+{
+ public function __construct($message, $code)
+ {
+ parent::__construct($message, $code);
+ }
+}

0 comments on commit 267296a

Please sign in to comment.
Something went wrong with that request. Please try again.