def set_file_license_in_file(self, doc, lic):
if self.has_package(doc) and self.has_file(doc):<EOL><INDENT>if validations.validate_file_lics_in_file(lic):<EOL><INDENT>self.file(doc).add_lics(lic)<EOL>return True<EOL><DEDENT>else:<EOL><INDENT>raise SPDXValueError('<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise OrderError('<STR_LIT>')<EOL><DEDENT>
Raises OrderError if no package or file defined.
Raises SPDXValueError if malformed value.