Request for exceptions usage documentation

Open
#1,122 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
cpp
Domain
documentation

Research direction

Start with src/exceptions.cpp, which the issue identifies as a possible list of exceptions, and compare it with the exception handling and node lookup paths that determine what users can catch. Document each exception's meaning and when it is thrown, including the KeyNotFound example. Done means users can find a reliable explanation of the exceptions exposed by yaml-cpp.

Written by the indexing model from the issue text.

Description

documentation help wanted

Thank you for the work on this great project. I wanted to ask you for documentation ( I could not find on my own ) for exceptions' specific usage.

For instance it is not clear which exceptions are propagated up to the user's logic and which are consumed internally. I found this file and it seems theses are the exceptions the user can expect to catch from yaml-cpp. However, I am not completely sure.

There are certain types of exceptions I could not manually force yaml-cpp to throw.
For instance the YAML::KeyNotFound exception is not thrown when you do this:

YAML::Node node_representing_yaml_config = YAML::LoadFile("example.yaml");
node_representing_yaml_config["notpresentkey"];

TL;DR

What are the exceptions the user can expect yaml-cpp to throw and when each of them is thrown (logically/semantically) ?

Dominant language
C++
Stars
6.1k
Forks
2.2k
Avg merge
22h 2m
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jbeder/yaml-cpp

All issues in jbeder/yaml-cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.