Skip to content

Recoverable Error Handling #4385

Closed
Closed
@martindevans

Description

@martindevans

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest code. Development is very rapid so there are no tagged versions as of now.
  • I carefully followed the README.md.
  • I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • I reviewed the Discussions, and have a new bug or useful enhancement to share.

Feature Description

Use a form of error handling which doesn't immediately terminate the process (GGML_ASSERT).

Motivation

Currently llama.cpp checks various conditions with GGML_ASSERT and if it fails it will immediately abort(). There's no way to handle this error and it immediately kills the process, which makes it difficult to build robust services using llama.cpp. see for example: SciSharp/LLamaSharp#343 (comment)

This has presented an issue in LLamaSharp (which I'm one of the developers of). In C# it's more reasonable that an error might throw an exception, which can be handled. Unfortunately there's no way at all for us to implement this.

Possible Implementation

I don't know C++ well enough to comment. But from the perspective of LLamaSharp (and probably other wrappers) any kind of error signalling that didn't immediately terminate the process would be great!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions