When encountering an error during Katana scenegraph traversal RfK with either warn or abort according to specific settings on the scene and/or location in question. RfK also allows this behavior to be overridden with a custom AttributeFunction.
Katana Error Handling
Errors within Katana scenegraph traversal are indicated (from Katana or the scene recipe) by an "errorMessage" attribute at that location. A fatal error is indicated when the location "type" has been set to "error" or if the attribute "errorSeverity" has been set to "critical". RfK will skip over error locations by default, which can result in missing geometry in the render. If you want RfK to abort the render when it encounters an error location, you can set the
prmanGlobalStatements.errorHandler to "
abortall". With this attribute set, all error locations will cause an aborted render. However, if you wish to have more control over the specific errors that should cause an abort, there is a mechanism by which a custom override handler can be added to intercept and reinterpret the error location. An attribute function can be injected into RfK that will make the final determination of whether a location error is fatal or not. This attribute function runs after RfK has done its work for deriving the error's fatality essentially giving the author the last word.
The attribute function is given the location path and the location's attributes as input and is expected to return an attribute containing an integer "abort" attribute indicating whether or not the render should be terminated.
Below you'll find an example of an override attribute function. The function is activated by setting the following string attribute at /root:
"prmanGlobalStatements.plugin.katanaErrorHandlerAttrFncs" = "MyOverrideKatanaErrorHandler"
RenderMan Error Handling
Errors in RenderMan contain a error code and error message. By default, these errors will show up in the Render Log, but the render will not terminate. You can change the preference for this with the
prmanGlobalStatements.errorHandler option in PrmanGlobalStatements. Setting the value to "abort" or "abortall" will terminate the render. For finer control, RfK provides a mechanism to override an errorHander set to abort or arbortall based on specific error codes and error messages. An attribute function is injected into prman's error handling system to determine if an error should result in termination of the render.
The arguments to the attribute function are the error code and the error message. The function is expected to return an attribute containing an integer "abort" attribute indicating whether or not the render should be terminated.
"prmanGlobalStatements.plugin.rendermanErrorHandlerAttrFncs" = "MyOverridePrmanErrorHandler"