Skip to content

Consistently catch and throw only exceptions deriving from std::exception - #1599

Merged
ggerganov merged 3 commits into
ggml-org:masterfrom
mgroeber9110:catch_std_exception
Jun 5, 2023
Merged

ggerganov merged 3 commits into
ggml-org:masterfrom
mgroeber9110:catch_std_exception

Conversation

@mgroeber9110

@mgroeber9110 mgroeber9110 commented May 26, 2023 •

Copy link
Copy Markdown
Contributor

This change makes sure that all exceptions thrown and caught are derived from std::exception (typically, std::runtime_error), rather than mixing std::string and std::runtime_error in different parts of the code.

This should fix #1569 and fix #1589 and completes the changes in #1316 (which already changed exception types to std::runtime_error in llama-util.h).

@ggerganov
ggerganov merged commit c2df36d into ggml-org:master Jun 5, 2023
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
…d::exception (ggml-org#1599)

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
…d::exception (ggml-org#1599)

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
…d::exception (ggml-org#1599)

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
…d::exception (ggml-org#1599)

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
…d::exception (ggml-org#1599)

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

std::runtime_error exceptions not caught as std::string by Visual C++? terminate called after throwing an instance of 'std::runtime_error'

4 participants