Catch generic exception to prevent Segment from breaking everything

This commit is contained in:
James Brooks
2015-07-23 21:37:32 +01:00
parent 07861dd245
commit 02cb04d36f
3 changed files with 4 additions and 5 deletions

View File

@@ -10,7 +10,6 @@
*/
use CachetHQ\Cachet\Facades\Setting;
use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\Request;
use Jenssegers\Date\Date;
@@ -61,7 +60,7 @@ if (!function_exists('segment_identify')) {
} else {
return false;
}
} catch (QueryException $e) {
} catch (Exception $e) {
return false;
}
}
@@ -97,7 +96,7 @@ if (!function_exists('segment_track')) {
} else {
return false;
}
} catch (QueryException $e) {
} catch (Exception $e) {
return false;
}
}
@@ -131,7 +130,7 @@ if (!function_exists('segment_page')) {
} else {
return false;
}
} catch (QueryException $e) {
} catch (Exception $e) {
return false;
}
}

0
bootstrap/cache/.gitignore vendored Normal file → Executable file
View File

2
composer.lock generated
View File

@@ -1546,7 +1546,7 @@
"name": "Jeremy Lindblom",
"email": "jeremeamia@gmail.com",
"homepage": "https://github.com/jeremeamia",
"role": "developer"
"role": "Developer"
}
],
"description": "Serialize Closure objects, including their context and binding",