PHPackages                             sura/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sura/corner

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sura/corner
===========

Generic PHP Exceptions and Errors, made user-friendly.

1.0.20(3mo ago)0601MITPHPPHP ^8.4 || ^8.5CI passing

Since Jan 27Pushed 3mo agoCompare

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

READMEChangelog (10)Dependencies (4)Versions (23)Used By (1)

Corner
======

[](#corner)

[![Latest Stable Version](https://camo.githubusercontent.com/eedfeaa87f786ce528e7057ee2b7a8bac93326e4f2b62e880748c7e42e70be38/687474703a2f2f706f7365722e707567782e6f72672f737572612f636f726e65722f76)](https://packagist.org/packages/sura/corner)[![Total Downloads](https://camo.githubusercontent.com/bb778f5eafa53ced983768e81d4f5a95a988388154c549c98c8ddd090610f0fe/687474703a2f2f706f7365722e707567782e6f72672f737572612f636f726e65722f646f776e6c6f616473)](https://packagist.org/packages/sura/corner)[![Latest Unstable Version](https://camo.githubusercontent.com/485e77f428c673558b2e77f5b391f9de48143faa500b2c0eb698071f6b1690b1/687474703a2f2f706f7365722e707567782e6f72672f737572612f636f726e65722f762f756e737461626c65)](https://packagist.org/packages/sura/corner)[![License](https://camo.githubusercontent.com/495748245313ba719ccc200917f8b882a5adfc9c02fa51d1c9b864883510a6cf/687474703a2f2f706f7365722e707567782e6f72672f737572612f636f726e65722f6c6963656e7365)](https://packagist.org/packages/sura/corner)[![PHP Version Require](https://camo.githubusercontent.com/ac462289437a8b9da23f6c6a56c8158e2b6a083687ae9d39023c4e3145ea6f23/687474703a2f2f706f7365722e707567782e6f72672f737572612f636f726e65722f726571756972652f706870)](https://packagist.org/packages/sura/corner)[![Github repo](https://camo.githubusercontent.com/de7b58312272928c0d04cc4ed76166a3f54688939c0c15dbf4cee590a331c3e9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6769746875622d7265706f2d626c75653f6c6f676f3d676974687562)](https://github.com/Sura-laboratory/corner)

- Version 1.x: Requires PHP 8.4 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

42

—

FairBetter than 90% of packages

Maintenance79

Regular maintenance activity

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 79.7% 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

Every ~0 days

Total

21

Last Release

108d ago

PHP version history (2 changes)1.0.0PHP ^8.1

1.0.1PHP ^8.4 || ^8.5

### 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 (110 commits)")[![t0nipit](https://avatars.githubusercontent.com/u/257520440?v=4)](https://github.com/t0nipit "t0nipit (17 commits)")[![angelaeveryday](https://avatars.githubusercontent.com/u/257863552?v=4)](https://github.com/angelaeveryday "angelaeveryday (11 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[timothepearce/laravel-time-series

Laravel Time Series provides an API to create and maintain projected data from you Eloquent models, and represent them as time-series.

955.4k](/packages/timothepearce-laravel-time-series)[ianm/syndication

Brings RSS and Atom feeds to Flarum

1515.9k](/packages/ianm-syndication)

PHPackages © 2026

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