Index: branches/5.3.x/core/kernel/utility/event.php =================================================================== diff -u -N -r15698 -r16181 --- branches/5.3.x/core/kernel/utility/event.php (.../event.php) (revision 15698) +++ branches/5.3.x/core/kernel/utility/event.php (.../event.php) (revision 16181) @@ -1,6 +1,6 @@ Init($prefix, $special); } $this->Name = isset($params['name']) ? $params['name'] : ''; } elseif ( is_string($params) ) { - if (preg_match('/([^.:]*)[.]{0,1}([^:]*):(.*)/', $params, $regs)) { + if ( preg_match('/([^.:]*)[.]{0,1}([^:]*):(.*)/', $params, $regs) ) { $prefix = $regs[1]; $special = $regs[2]; - if ($prefix) { + if ( $prefix ) { $this->Init($prefix, $special); } $this->Name = $regs[3]; } else { - throw new Exception('Invalid event string: "' . $params . '". Should be in "prefix[.special]:OnEvent" format'); + $error_msg = 'Invalid event string: "' . $params . '". '; + $error_msg .= 'Should be in "prefix[.special]:OnEvent" format'; + throw new InvalidArgumentException($error_msg); } } } @@ -445,4 +447,4 @@ { return $this->getPrefixSpecial() . ':' . $this->Name; } - } \ No newline at end of file + }