From 2f9591aa8675b84ff50fd74809f380d0467a3998 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Tue, 15 Jul 2025 23:38:03 +0900 Subject: [PATCH] examples: exception handling++ --- examples/Example.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/Example.h b/examples/Example.h index 583ffc9f..d1680159 100644 --- a/examples/Example.h +++ b/examples/Example.h @@ -90,6 +90,11 @@ struct Example auto rpath = realpath(path, buf); #endif + if (!rpath) { + cout << "Couldn't open directory \"" << path << "\"." << endl; + return; + } + //open directory #ifdef _WIN32 WIN32_FIND_DATA fd;