A better way would maybe be to create an error object and API, and return that from `errorAt()`, e.g.:

```php
if ($error= xp::errorAt(__FILE__, __LINE__ - 1)) {
  echo $error->message(), ' at ', $error->file(), ':', $error->line();
}
```