Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
TelegramBot
Commits
9960f62f
Commit
9960f62f
authored
Feb 04, 2016
by
Marco Boretto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #81 from noplanman/code_cleanup_TelegramException
Code cleanup for TelegramException.php
parents
998983dd
ed670a9d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
TelegramException.php
src/Exception/TelegramException.php
+13
-5
No files found.
src/Exception/TelegramException.php
View file @
9960f62f
<?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 that writes the exception message to the logfile
*
* @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
);
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment