1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-13 03:54:04 +02:00

bridges: Replace returnError function with more specific

Replacements depend on original error code:
400: returnClientError
404: returnServerError
500: returnServerError
501: returnServerError
This commit is contained in:
logmanoriginal
2016-08-17 14:45:08 +02:00
parent 73a1bcf3d6
commit 74f0572d91
124 changed files with 401 additions and 400 deletions

View File

@@ -6,7 +6,7 @@ class EstCeQuonMetEnProdBridge extends BridgeAbstract {
$this->name = 'Est-ce qu\'on met en prod aujourd\'hui ?';
$this->uri = 'https://www.estcequonmetenprodaujourdhui.info/';
$this->description = 'Should we put a website in production today? (French)';
$this->update = "2016-08-09";
$this->update = '2016-08-17';
}
public function collectData(array $param) {
@@ -18,7 +18,7 @@ class EstCeQuonMetEnProdBridge extends BridgeAbstract {
} return false;
}
$html = $this->file_get_html($this->getURI()) or $this->returnError('Could not request EstCeQuonMetEnProd: '.$this->getURI(), 500);
$html = $this->file_get_html($this->getURI()) or $this->returnServerError('Could not request EstCeQuonMetEnProd: '.$this->getURI());
$item = new \Item();
$item->uri = $this->getURI().'#'.date('Y-m-d');