On 02/16/2015 02:47 PM, Domen Vrankar wrote:
> I've noticed that exceptions are not used but was not certain how else
> to handle this

FYI, the proposed GetCanonicalPath already exists in KWSys as
SystemTools::GetRealPath.  It returns the unchanged path on error.
That could be extended to take an optional second argument as a
pointer to a buffer describing the error.  If the argument is NULL
use the current behavior.  Otherwise return an empty string and
populate the error info.  Then make your new call sites use the
new argument.

> One more question... When I first started writing the patch I thought
> about printing out a warning if circular recursion is detected but was
> not certain if it would be OK to just write the output to std::cerr
> (or the kwsys wrapper equivalent) with canonical paths that caused it.
> Should I leave out such message or would it be better to add it and
> how?

Since KWSys is a library it shouldn't print anything on behalf of
the application.  The Glob API could also take an optional pointer
to an error description buffer.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to