/* xbt_str.cpp - various helping functions to deal with strings */
-/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
double res = strtod(str, &endptr);
if (endptr[0] != '\0')
- throw std::invalid_argument(simgrid::xbt::string_printf("%s: %s", error_msg, str));
+ throw std::invalid_argument(simgrid::xbt::string_printf("%s: %s (parse error at '%s')", error_msg, str, endptr));
return res;
}