summaryrefslogtreecommitdiff
path: root/http/index.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-01-16 22:47:10 +0100
committeremkael <emkael@tlen.pl>2017-01-16 22:50:28 +0100
commitab5c4ff0a0e4f1c4b10d6758d27f769366bb504c (patch)
tree079e22f615aabde378dd60fc0571f5196de2a586 /http/index.php
parent677953067f2bb5502a70f0d004f1ac844b18a128 (diff)
* error handling
Diffstat (limited to 'http/index.php')
-rw-r--r--http/index.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/http/index.php b/http/index.php
index 17613e9..e6474bd 100644
--- a/http/index.php
+++ b/http/index.php
@@ -22,10 +22,15 @@ foreach ($params as $param) {
$parsedParams[$splitParam[0]] = count($splitParam) > 1 ? $plitParam[1] : TRUE;
}
-require_once('../providers/' . $provider . '.php');
-$provider = '\\Providers\\' . $provider;
-$provider = new $provider($feed, $parsedParams);
-$content = $provider->get();
+try {
+ require_once('../providers/' . $provider . '.php');
+ $provider = '\\Providers\\' . $provider;
+ $provider = new $provider($feed, $parsedParams);
+ $content = $provider->get();
+} catch (Exception $e) {
+ print $e->getMessage();
+ die();
+}
require_once('../lib/smarty3/Smarty.class.php');