mirror of
https://github.com/HowardHinnant/date.git
synced 2025-01-14 01:37:57 +08:00
Catch and display exception messages a Microsofts C runtime on Windows doesn't show them otherwise.
This commit is contained in:
parent
ee96fe5c6d
commit
c7960fbd89
@ -83,8 +83,8 @@ test_info(const date::time_zone* zone, const date::sys_info& info)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
void
|
||||
tzmain()
|
||||
{
|
||||
using namespace date;
|
||||
using namespace std::chrono;
|
||||
@ -142,4 +142,19 @@ main()
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user