* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Mage\Task; use Exception; /** * The Task Failed, and it has a Custom Message * * @author Andrés Montañez */ class ErrorException extends Exception { public function getTrimmedMessage($maxLength = 20) { $message = $this->getMessage(); if (strlen($message) > $maxLength) { $message = substr($message, 0, $maxLength) . '...'; } return $message; } }