[Bf-blender-cvs] [8072c47] alembic_pointcache: Use a default handler for printing Alembic errors in case no explicit error handler is used, to avoid silent failure.
Lukas Tönne
noreply at git.blender.org
Fri Feb 13 17:56:08 CET 2015
Commit: 8072c476b4d6c269a962c63169031ccc05dacdfb
Author: Lukas Tönne
Date: Fri Feb 13 17:55:13 2015 +0100
Branches: alembic_pointcache
https://developer.blender.org/rB8072c476b4d6c269a962c63169031ccc05dacdfb
Use a default handler for printing Alembic errors in case no explicit
error handler is used, to avoid silent failure.
===================================================================
M source/blender/pointcache/util/util_error_handler.h
===================================================================
diff --git a/source/blender/pointcache/util/util_error_handler.h b/source/blender/pointcache/util/util_error_handler.h
index a707524..61baa03 100644
--- a/source/blender/pointcache/util/util_error_handler.h
+++ b/source/blender/pointcache/util/util_error_handler.h
@@ -141,13 +141,15 @@ void handle_alembic_exception(T &handler, PTCErrorLevel level, const Alembic::Ut
template <typename T>
void handle_alembic_exception(T *handler, PTCErrorLevel level, const Alembic::Util::Exception &e)
{
- if (handler) {
- const char *origin, *msg;
- split_alembic_error_message(e.what(), &origin, &msg);
-
- handler->set_error_level(level);
- handler->handle(level, msg);
- }
+ static StdErrorHandler default_handler(PTC_ERROR_WARNING);
+ if (!handler)
+ handler = &default_handler;
+
+ const char *origin, *msg;
+ split_alembic_error_message(e.what(), &origin, &msg);
+
+ handler->set_error_level(level);
+ handler->handle(level, msg);
}
#endif
More information about the Bf-blender-cvs
mailing list