echojson_encode(['ok'=>false,'error_code'=>400,'error_description'=>$e->getMessage().' on line '.$e->getLine().' of '.basename($e->getFile())]);
error_log('Exception thrown: '.$e->getMessage());
error_log($e->getTraceAsString());
}catch(\danog\MadelineProto\Exception$e){
echojson_encode(['ok'=>false,'error_code'=>400,'error_description'=>$e->getMessage().' on line '.$e->getLine().' of '.basename($e->getFile())]);
error_log('Exception thrown: '.$e->getMessage());
error_log($e->getTraceAsString());
}catch(\danog\MadelineProto\RPCErrorException$e){
echojson_encode(['ok'=>false,'error_code'=>$e->getCode(),'error_description'=>$e->getMessage().' on line '.$e->getLine().' of '.basename($e->getFile())]);