An attempt to diff two different content types (where at least one is non-text-based) typically results in an exception being thrown. This is bad form as it results in production errors (any two revisions can be diffed, and it's often possible to change the content type of a page into something incompatible). It's even worse with MCR where only one slot having different content types results in an error page, even though the user might have a legitimate need to see the diff of another slot.
Either the exception should be more specific (right now it tends to be just plain Exception, MWException, AssertionError or something similarly vague) and callers should handle it, or instead of throwing we should just return an error string (as Wikibase handled it in gerrit 349878, although it seems that re-broke since).