Commit f7dd3d80 authored by Armando Lüscher's avatar Armando Lüscher

Initial code cleanup of `TelegramException.php`.

No functional changes, only modifications of documentation and code layout.
parent 6c03ff17
<?php <?php
/* /**
* This file is part of the TelegramBot package. * This file is part of the TelegramBot package.
* *
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com> * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Longman\TelegramBot\Exception; namespace Longman\TelegramBot\Exception;
/**
* Main exception class used for exception handling
*/
class TelegramException extends \Exception class TelegramException extends \Exception
{ {
/**
* Exception constructor
*
* @param string $message Error message
* @param integer $code Error code
*/
public function __construct($message, $code = 0) public function __construct($message, $code = 0)
{ {
parent::__construct($message, $code); parent::__construct($message, $code);
...@@ -19,9 +28,8 @@ class TelegramException extends \Exception ...@@ -19,9 +28,8 @@ class TelegramException extends \Exception
$path = 'TelegramException.log'; $path = 'TelegramException.log';
$status = file_put_contents( $status = file_put_contents(
$path, $path,
date('Y-m-d H:i:s', time()) .' '. self::__toString() . "\n", date('Y-m-d H:i:s', time()) . ' ' . self::__toString() . "\n",
FILE_APPEND FILE_APPEND
); );
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment