mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-03 04:34:26 +02:00
Catch and display exception messages a Microsofts C runtime on Windows doesn't show them otherwise.
This commit is contained in:
@@ -83,8 +83,8 @@ test_info(const date::time_zone* zone, const date::sys_info& info)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
void
|
||||||
main()
|
tzmain()
|
||||||
{
|
{
|
||||||
using namespace date;
|
using namespace date;
|
||||||
using namespace std::chrono;
|
using namespace std::chrono;
|
||||||
@@ -143,3 +143,18 @@ main()
|
|||||||
std::cout << '\n';
|
std::cout << '\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
tzmain();
|
||||||
|
}
|
||||||
|
catch(const std::exception& ex)
|
||||||
|
{
|
||||||
|
std::cout << "An exception occured: " << ex.what() << std::endl;
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user