Jump to >

reviewboard.diffviewer.errors

exception UserVisibleError[source]

Bases: Exception

A user-visible error shown in the rendered output.

exception DiffCompatError[source]

Bases: Exception

Unknown diff compatibility version error.

exception DiffTooBigError(message, max_diff_size)[source]

Bases: ValueError

The supplied diff file was too large.

__init__(message, max_diff_size)[source]

Initialize the error.

Parameters
  • message (unicode) – The error message to display.

  • max_diff_size (int) – The maximum allowable diff size, in bytes.

exception EmptyDiffError[source]

Bases: ValueError

A supplied diff file was empty.

exception DiffParserError(message, linenum=None)[source]

Bases: Exception

An error encountered when parsing a diff file.

__init__(message, linenum=None)[source]

Initialize the error.

Parameters
  • message (unicode) – The error message to display.

  • linenum (int) – The line number in the diff file where the parse error occurred.

exception PatchError(filename, error_output, orig_file, new_file, diff, rejects)[source]

Bases: reviewboard.diffviewer.errors.UserVisibleError

An error which occurred when trying to apply a patch.

__init__(filename, error_output, orig_file, new_file, diff, rejects)[source]

Initialize the error.

Parameters
  • filename (unicode) – The name of the file being patched.

  • error_output (unicode) – The error output from the patch command.

  • orig_file (bytes) – The original contents of the file.

  • new_file (bytes) – The new contents of the file, if available.

  • diff (bytes) – The contents of the diff.

  • rejects (bytes) – The contents of the rejects file, if available.

__annotations__ = {}