Commit Graph

11 Commits

Author SHA1 Message Date
twestenkarl
e46c4576f8
Merge 5b1c606801 into c2bec4c755 2024-11-01 13:04:55 +01:00
Federico Di Pierro
bc67157109 fix(src): avoid possible infinite loop in LoadAll().
Leave at first empty root.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-10-29 22:21:05 -05:00
Karl Twesten
5b1c606801 Support for building with exceptions disabled
1) A new macro YAML_CPP_NORETURN to annotate functions as not returning in dll.h
2) A new function YAML_throw<ExceptionType>(args...) in exception.h
   this function will throw an exception unless exceptions are disabled in the compiler,
   detected by checking the pre-defined macro __cpp_exceptions
   In this case the exception class will be instantiated, and the user-provided function
   YAML::handle_exception(const char*) will be called on the exception's what() method
3) if exceptions are disabled,and the library's user does not provide YAML::handle_exception,
   there will be a linker error
4) all other files have been changed automatedly by running the following sed commands
   sed -i "s/throw \([A-Za-z]*\)(\(.*\))/YAML_throw<\1>(\2)/g" # throw statements for non-templated exceptions
   sed -i "s/throw \(.*\)<\(.*\)>(/YAML_throw<\1<\2> >(/g" # throw statements for templated exceptions
2022-10-21 17:05:47 +02:00
Rosen Penev
4c90f2962e
[clang-tidy] use bool literals (#881)
Found with modernize-use-bool-literals

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-15 15:30:37 -05:00
Ted Lyngmo
a98b8af448
Add filename to the BadFile exception (#858)
The BadFile exception which is thrown when failing to open a file now
contains the filename.
2020-05-07 14:46:28 -05:00
Ian Taylor
9f2781b527
Fix clang format (#854)
Fix invocation of clang-format in CMakeLists and apply clang-format.
2020-04-29 09:40:33 -05:00
Jesse Beder
3392ab980e Update doc, formatting for parse.h. 2016-05-12 23:20:03 -05:00
Jesse Beder
4b40441cee Run IWYU 2014-03-22 23:14:48 -05:00
Jesse Beder
d63ec48c8a Run clang-format 2014-03-22 13:05:03 -05:00
Jesse Beder
0c772c4c3f Set LoadFile and LoadAllFromFile to throw an exception if we can't load the file 2012-11-08 18:14:26 -06:00
Jesse Beder
c22512649e Copied all files from new-api branch of old repo 2012-05-19 15:34:02 -05:00