Commit Graph

17 Commits

Author SHA1 Message Date
ToruNiina
cc2e453b5b feat: remove strerror from errmsg in FILE* version
parse(FILE*) is a minor overload, but dispatching strerror takes too
much cost. Standard library version is not thread-safe, so some compiler
reports a warning. There are thread-safe versions defined in XSI, GNU,
and Windows. XSI/GNU versions can be detected by macros, but in some
cases, detection-by-macro written in the doc does not work.
Since errno can be obtained from the exception, users can call strerror
that is available in their env if needed. We can just report errno.
2024-01-07 10:48:17 +09:00
Esonhugh
0db935b602 fix: let __DARWIN_C as an exception 2023-12-27 11:19:59 +08:00
Esonhugh
ed577df40a fix: strerror_r error handling toml/exception.hpp in macos 2023-12-27 11:11:23 +08:00
ToruNiina
937a7c45fe feat: fill char buffer with null char
those funcs always return null-terminated string but just to make it
sure
2023-10-11 01:44:30 +09:00
ToruNiina
947c995189 fix: include array to use char buffer 2023-10-11 01:43:55 +09:00
ToruNiina
9b7b8908e8 fix: avoid evaluating undefined macro as zero
to suppress a warning
2023-10-11 01:24:41 +09:00
ToruNiina
22d22198ec feat: use thread-safe variant of strerror 2023-10-11 01:08:12 +09:00
ToruNiina
c2af975609 fix: add missing include file and specifiers 2022-09-29 20:14:58 +09:00
Lukáš Hrázký
bf9c9d620d feat: Add a parse(FILE *) interface
The fstream classes are notorious for their non-existent error handling.

This adds a C-style fILE * IO (fopen(), etc.) alternative interface, so
that if a user needs reliable error handling, they can use that, albeit
more inconvenient, but more robust approach.
2022-09-08 17:05:11 +02:00
ToruNiina
b1c9df8998 feat: reorder headers following google c++ style
related to: #115
2020-06-28 00:58:20 +09:00
ToruNiina
f2c8d0e279 refactor: add missing explicit to toml::exception 2020-01-19 17:51:24 +09:00
ToruNiina
bc3eb9d967 feat: add src_loc to all the exceptions
including internal_error.
2019-11-01 21:14:33 +09:00
ToruNiina
8e589ff4d7 feat: add source_location to (syntax_|type_)error 2019-10-31 22:04:16 +09:00
ToruNiina
fd063af7ce refactor: make include guard style uniform 2019-03-16 14:19:47 +09:00
ToruNiina
fd21d5dd95 add simplest copyright notice 2018-12-13 20:44:10 +09:00
Guillaume Fraux
57cc7f77c1 Allow to build with intel c++ compiler 2017-06-13 16:05:55 +02:00
ToruNiina
78f25dd66d split files 2017-04-21 13:14:53 +09:00