@@ -33,7 +33,7 @@ std::string format(const char *fmt, Args... args) {
3333 char *buf = new char [sz];
3434 int ret = snprintf (buf, sz, fmt, args...);
3535 if (ret != sz - 1 )
36- throw std::runtime_error (" Error formatting string!" );
36+ throw std::runtime_error (" [cmkr] error: Error formatting string!" );
3737 std::string temp (buf, buf + sz - 1 );
3838 delete[] buf;
3939 return temp;
@@ -80,7 +80,7 @@ int generate_project(const char *str) {
8080 dest = " include/" + dir_name;
8181 } else {
8282 throw std::runtime_error (
83- " Unknown project type. Types are exe, lib, shared, static, interface!" );
83+ " [cmkr] error: Unknown project type. Types are exe, lib, shared, static, interface!" );
8484 }
8585
8686 const auto tomlbuf = detail::format (cmake_toml, dir_name.c_str (), dir_name.c_str (), str,
@@ -257,7 +257,7 @@ int generate_cmake(const char *path) {
257257 add_command = " add_library" ;
258258 } else {
259259 throw std::runtime_error (
260- " Unknown binary type! Supported types are exe, shared and static" );
260+ " [cmkr] error: Unknown binary type! Supported types are exe, lib, shared, static, interface " );
261261 }
262262
263263 if (!bin.sources .empty ()) {
@@ -391,6 +391,8 @@ int generate_cmake(const char *path) {
391391 if (fs::exists (fs::path (sub) / " cmake.toml" ))
392392 generate_cmake (sub.c_str ());
393393 }
394+ } else {
395+ throw std::runtime_error (" [cmkr] error: No cmake.toml found!" );
394396 }
395397 return 0 ;
396398}
0 commit comments