123456789101112131415161718192021222324252627282930313233343536373839(************************************************************************)(* * The Rocq Prover / The Rocq Development Team *)(* v * Copyright INRIA, CNRS and contributors *)(* <O___,, * (see version control and CREDITS file for authors & dates) *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(* * (see LICENSE file for the text of the license) *)(************************************************************************)exceptionCannotParseFileofstring*(int*int)exceptionCannotParseProjectFileofstring*stringexceptionCannotOpenFileofstring*stringexceptionCannotOpenProjectFileofstringlet()=CErrors.register_handler@@function|CannotParseFile(s,(i,j))->SomePp.(str"File \""++strs++str"\","++str"characters"++spc()++inti++str"-"++intj++str":"++spc()++str"Syntax error")|CannotParseProjectFile(file,msg)->SomePp.(str"Project file"++spc()++str"\""++strfile++str"\":"++spc()++str"Syntax error:"++strmsg)|CannotOpenFile(s,msg)->SomePp.(strs++str":"++spc()++strmsg)|CannotOpenProjectFilemsg->(* TODO: more info? *)SomePp.(strmsg)|_->Noneletcannot_parsesij=raise@@CannotParseFile(s,ij)letcannot_open_project_filemsg=raise@@CannotOpenProjectFilemsgletcannot_parse_project_filefilemsg=raise@@CannotParseProjectFile(file,msg)letcannot_opensmsg=raise@@CannotOpenFile(s,msg)