Do you really want the parent function name in the error message instead of savePreview, or is this a copy-and-paste error?