PHPackages                             temis/corner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. temis/corner

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

temis/corner
============

Generic PHP Exceptions and Errors, made user-friendly.

1.0.0(5mo ago)011MITPHPPHP ^8

Since Dec 7Pushed 5mo agoCompare

[ Source](https://github.com/temislabs/corner)[ Packagist](https://packagist.org/packages/temis/corner)[ RSS](/packages/temis-corner/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (1)

Corner
======

[](#corner)

[![Linux Build Status](https://camo.githubusercontent.com/30aa6cbd14f27ed67301b6b414f978f5bb30d9befc6f553488c8cdd26051b8dd/68747470733a2f2f7472617669732d63692e6f72672f74656d69732f636f726e65722e7376673f6272616e63683d6d61696e)](https://travis-ci.org/temis/corner)[![Latest Stable Version](https://camo.githubusercontent.com/a57ab8844bc69aa4a6498efa370bca54fa41b5d75282c9a1bafd9f8f749f08ad/68747470733a2f2f706f7365722e707567782e6f72672f74656d69732f636f726e65722f762f737461626c65)](https://packagist.org/packages/temis/corner)[![Latest Unstable Version](https://camo.githubusercontent.com/da705379b67336ffd69baafe1bb0f9d78191e881a0580b9d30acab2f6d5ed821/68747470733a2f2f706f7365722e707567782e6f72672f74656d69732f636f726e65722f762f756e737461626c65)](https://packagist.org/packages/temis/corner)[![License](https://camo.githubusercontent.com/82440420ddd33b6b2e9f0ac451e191b1d6bd9b389d5c408122dbea83f8827141/68747470733a2f2f706f7365722e707567782e6f72672f74656d69732f636f726e65722f6c6963656e7365)](https://packagist.org/packages/temis/corner)[![Downloads](https://camo.githubusercontent.com/9c98367f20027058340a49c73f1838d88d491e1a8454447b99dd1f50f0c2b567/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74656d69732f636f726e65722e737667)](https://packagist.org/packages/temis/corner)

PHP Exceptions and Errors designed to prevent your users from sharp corners. Inspired by [Rust's helpful error messages](https://twitter.com/acfoltzer/status/1074813646625169408).

- Version 1.x: Requires PHP 8.0 or newer.

Motivation
----------

[](#motivation)

There are already libraries like [Whoops](https://github.com/filp/whoops) which focus on taking existing uncaught Exceptions and giving them a user interface.

Rather than take control of your entire UI output, Corner extends the base `Throwable` interface and `Exception`/`Error` classes and makes them more useful even in non-UI contexts.

Corner's Extended Exception API
-------------------------------

[](#corners-extended-exception-api)

### `getHelpfulMessage()`

[](#gethelpfulmessage)

> What *exactly* is going on here?

Imagine an email. `Throwable::getMessage()` can be likened to the subject line. In traditional exceptions, the closest thing you have to a message body is `getTraceAsString()`.

In Corner, the "helpful message" is meant to be a full-text explanation of the problem. ASCII art diagrams (hard-coded or generated from the source code, if applicable) are permitted.

### `getSnippet($before = 0, $after = 0, $traceWalk = 0)`

[](#getsnippetbefore--0-after--0-tracewalk--0)

> What was the code surrounding the exception doing?

By default, this returns the line of PHP code that triggered the exception.

You can optionally pass a number of leading and trailing lines to this method to read more text from the source code file. The third argument allows you to excerpt snippets of code from within the stack trace.

The main use case for `getSnippet()` is to generate helpful error messages for `getHelpfulMessage()`.

### `getSupportLink()`

[](#getsupportlink)

> Where can I find help?

The intent of this method is to give the developer using your project the quickest possible path to troubleshooting and solving the problem that they're most likely facing if this Exception / Error gets thrown.

If possible, link to a specific section of your project's documentation (including page anchors, if applicable) to get the developer closer to the solution to whatever problem they're encountering.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance71

Regular maintenance activity

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

162d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6cdac9e4390ea15486f926c4a89f4c02020954be51c17d5886299b5b83d75ecf?d=identicon)[semyon492](/maintainers/semyon492)

---

Top Contributors

[![SegFaultCharmer](https://avatars.githubusercontent.com/u/247147113?v=4)](https://github.com/SegFaultCharmer "SegFaultCharmer (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/temis-corner/health.svg)

```
[![Health](https://phpackages.com/badges/temis-corner/health.svg)](https://phpackages.com/packages/temis-corner)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[ekino/newrelic-bundle

Integrate New Relic into Symfony2

28111.2M8](/packages/ekino-newrelic-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
