Exception management

Customized exception handling

Error message.

CG errors.

exception rayvision_utils.exception.exception.AnalyseFailError

Bases: rayvision_utils.exception.exception.AnalyzeError

Analyse Fail Error.

exception rayvision_utils.exception.exception.AnalyzeError

Bases: Exception

Analyze has a damage error.

exception rayvision_utils.exception.exception.CGExeNotExistError

Bases: rayvision_utils.exception.exception.AnalyzeError

No errors in CG boot.

exception rayvision_utils.exception.exception.CGFileNameIllegalError

Bases: rayvision_utils.exception.exception.AnalyzeError

CG File Name Illegal Error.

exception rayvision_utils.exception.exception.CGFileNotExistsError

Bases: rayvision_utils.exception.exception.AnalyzeError

CG file does not exist error.

exception rayvision_utils.exception.exception.CGFileZipFailError

Bases: rayvision_utils.exception.exception.AnalyzeError

CG file compression failed error.

exception rayvision_utils.exception.exception.CompressionFailedError

Bases: Exception

Compression failed error.

exception rayvision_utils.exception.exception.DecompressionFailedError

Bases: Exception

Unzip failed error.

exception rayvision_utils.exception.exception.FileNameContainsChineseError

Bases: rayvision_utils.exception.exception.AnalyzeError

File Name Contains Chinese Error.

exception rayvision_utils.exception.exception.GetCGLocationError

Bases: rayvision_utils.exception.exception.AnalyzeError

Error getting CG local path.

exception rayvision_utils.exception.exception.GetCGVersionError

Bases: rayvision_utils.exception.exception.AnalyzeError

Error getting CG version.

exception rayvision_utils.exception.exception.GetRendererError

Bases: rayvision_utils.exception.exception.AnalyzeError

Get renderer error.

exception rayvision_utils.exception.exception.MaxDamageError

Bases: rayvision_utils.exception.exception.AnalyzeError

Max has a damage error.

exception rayvision_utils.exception.exception.MaxExeNotExistError

Bases: rayvision_utils.exception.exception.AnalyzeError

There are no errors in the Max startup file.

exception rayvision_utils.exception.exception.MultiScatterAndVrayConfilictError

Bases: rayvision_utils.exception.exception.AnalyzeError

Multi scatter and vray Confilict error.

exception rayvision_utils.exception.exception.ProjectMaxVersionError

Bases: rayvision_utils.exception.exception.AnalyzeError

Project Max version error.

exception rayvision_utils.exception.exception.RayvisionAPIError(error_code, error, request)

Bases: rayvision_utils.exception.exception.RayvisionError

Raise RayVisionAPIError.

exception rayvision_utils.exception.exception.RayvisionError(error_code, error, *args, **kwargs)

Bases: Exception

Raise RayvisionError if something wrong.

class rayvision_utils.exception.exception.RayvisionHTTPErrorProcessor

Bases: urllib.request.HTTPErrorProcessor

Process HTTP error responses.

Inherit HTTPErrorProcessor in urllib2.

http_response(request, response)

Override the http_response method of HTTPErrorProcessor.

Process the response,when it is a bad Request,the corresponding exception is reported.

Parameters:
  • request (urllib2.Request) – Request object.
  • response (opener.open) – Response object.
Returns:

Abnormal response.

Return type:

Exception

exception rayvision_utils.exception.exception.RayvisonTaskIdError(error)

Bases: rayvision_utils.exception.exception.RayvisionError

Raise RayVisonTaskIdError.

exception rayvision_utils.exception.exception.VersionNotMatchError

Bases: rayvision_utils.exception.exception.AnalyzeError

Version not match error.

Handle tips messages and write them to tips.json.

class rayvision_utils.exception.tips.TipsInfo(save_path=None)

Bases: object

Handling errors encountered in the analysis.

add(key, *values)

Add tips message.

Parameters:
  • key (str) – TipsInfo code.
  • values (tuple) –

    TipsInfo message. e.g.:

    (‘Scene file no exists’, ‘Missing renderer’)
save_and_exit(path, exit_code=-1)

Save the prompt to the tips.json file and exit.

Parameters:
  • path (str) – The configuration information path path.
  • exit_code (int) – Exit code, default is -1.
save_tips(path=None)

Save the prompt to the tips.json file.

Parameters:path (str, optional) – The configuration information path path.
set_tips(key, value)

Set tips message.

Parameters:
  • key (str) – TipsInfo code.
  • value (str) – TipsInfo message.