rollbar++++
This commit is contained in:
parent
d9c609346f
commit
662b156589
22
.travis.yml
22
.travis.yml
@ -1,20 +1,6 @@
|
|||||||
sudo: required
|
env:
|
||||||
dist: trusty
|
- ACCESS_TOKEN=31979a2053e045548573d29232dde9c5
|
||||||
group: edge
|
- ENVIRONMENT=production
|
||||||
language: php
|
|
||||||
php:
|
|
||||||
- '7.0'
|
|
||||||
- '7.1'
|
|
||||||
- nightly
|
|
||||||
- hhvm
|
|
||||||
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- python3
|
|
||||||
before_script:
|
|
||||||
- composer update --dev
|
|
||||||
script:
|
script:
|
||||||
- "tests/testing.php"
|
- curl https://api.rollbar.com/api/1/deploy/ -F access_token=$ACCESS_TOKEN -F environment=$ENVIRONMENT -F revision=`git log -n 1 --pretty=format:"%H"` -F local_username=$USER
|
||||||
before_install:
|
|
||||||
- tar -xJpf enc.tar.xz
|
|
||||||
|
@ -17,13 +17,17 @@ class RPCErrorException extends \Exception
|
|||||||
public function __construct($message = null, $code = 0, Exception $previous = null)
|
public function __construct($message = null, $code = 0, Exception $previous = null)
|
||||||
{
|
{
|
||||||
switch ($message) {
|
switch ($message) {
|
||||||
|
case 'RPC_MCGET_FAIL':
|
||||||
case 'RPC_CALL_FAIL': $message = 'Telegram is having internal issues, please try again later.'; break;
|
case 'RPC_CALL_FAIL': $message = 'Telegram is having internal issues, please try again later.'; break;
|
||||||
case 'CHANNEL_PRIVATE':$message = "You haven't joined this channel/supergroup"; break;
|
case 'CHANNEL_PRIVATE':$message = "You haven't joined this channel/supergroup"; break;
|
||||||
case 'FLOOD_WAIT_666':$message = 'Spooky af m8'; break;
|
case 'FLOOD_WAIT_666':$message = 'Spooky af m8'; break;
|
||||||
|
case 'USER_IS_BOT':
|
||||||
case 'BOT_METHOD_INVALID':$message = 'This method cannot be run by a bot'; break;
|
case 'BOT_METHOD_INVALID':$message = 'This method cannot be run by a bot'; break;
|
||||||
|
case 'PHONE_CODE_EXPIRED': $message = 'The phone code you provided has expired, this may happen if it was sent to any chat on telegram (if the code is sent through a telegram chat (not the official account) to avoid it append or prepend to the code some chars)';
|
||||||
|
case 'USERNAME_INVALID': $message = 'The provided username is not valid';
|
||||||
}
|
}
|
||||||
parent::__construct($message, $code, $previous);
|
parent::__construct($message, $code, $previous);
|
||||||
|
if (in_array($message, ['The provided username is not valid'])) return;
|
||||||
\Rollbar\Rollbar::log($this);
|
\Rollbar\Rollbar::log($this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user