{"id":36986526,"url":"https://github.com/dmitry-suffi/error-handler","last_synced_at":"2026-01-13T23:04:29.222Z","repository":{"id":56970205,"uuid":"78540587","full_name":"dmitry-suffi/error-handler","owner":"dmitry-suffi","description":"ErrorHandler","archived":false,"fork":false,"pushed_at":"2018-08-06T18:10:26.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T20:14:41.228Z","etag":null,"topics":["errorhandler"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmitry-suffi.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-10T14:22:48.000Z","updated_at":"2018-08-06T18:10:27.000Z","dependencies_parsed_at":"2022-08-21T06:30:06.934Z","dependency_job_id":null,"html_url":"https://github.com/dmitry-suffi/error-handler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dmitry-suffi/error-handler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitry-suffi%2Ferror-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitry-suffi%2Ferror-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitry-suffi%2Ferror-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitry-suffi%2Ferror-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmitry-suffi","download_url":"https://codeload.github.com/dmitry-suffi/error-handler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmitry-suffi%2Ferror-handler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["errorhandler"],"created_at":"2026-01-13T23:04:28.465Z","updated_at":"2026-01-13T23:04:29.217Z","avatar_url":"https://github.com/dmitry-suffi.png","language":"PHP","readme":"ErrorHandler\n============\n\nError handling php. Can use any logger psr-3 for logging errors.\n\nInstallation\n------------\n```\ncomposer require dmitry-suffi/error-handler\n```\n\nconnection example\n------------------\n\n```php\n\n$handler = new \\suffi\\ErrorHandler\\ErrorHandler();\n\nset_error_handler([$handler, 'errorHandler']);\nset_exception_handler([$handler, 'exceptionHandler']);\n\n```\n\nSetting\n-------\n\nDebug mode. Displays error details.\n```php\n\n$handler-\u003edebug = true;\n\n```\n\nError Logging. Can use any logger psr-3 for logging errors.\n```php\n\n$handler-\u003ewriteLog = true;\n\n$handler-\u003elogger = $logger;\n\n```\n\nWriting to the log information\n```php\n\n$handler-\u003e$debugLog = true;\n\n```\n\nWhen you inherit from the class, you can change the way display messages to the user fault conditioning.\n```php\n    //Page with an error message\n    protected function htmlError(string $errstr)\n    {\n        return $errstr;\n    }\n\n    //Report an error for ajax-request\n    protected function jsonError(string $errstr)\n    {\n        return json_encode(['error' =\u003e $errstr]);\n    }\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitry-suffi%2Ferror-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitry-suffi%2Ferror-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitry-suffi%2Ferror-handler/lists"}