#NEWLINE# def exceptionreport( self , code , locator , text ) : #NEWLINE# #INDENT# ' Generate ExceptionReport ' #NEWLINE# self . parent . exception = True #NEWLINE# self . parent . status = 'OK' #NEWLINE# try : #NEWLINE# #INDENT# language = self . parent . config . get ( 'server' , 'language' ) #NEWLINE# ogc_schemas_base = self . parent . config . get ( 'server' , 'ogc_schemas_base' ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# language = 'en-US' #NEWLINE# ogc_schemas_base = self . parent . context . ogc_schemas_base #NEWLINE# #UNINDENT# node = etree . Element ( util . nspath_eval ( 'ows:ExceptionReport' , self . parent . context . namespaces ) , nsmap = self . parent . context . namespaces , version = '1.2.0' , language = language ) #NEWLINE# node . attrib [ util . nspath_eval ( 'xsi:schemaLocation' , self . parent . context . namespaces ) ] = ( '%s %s/ows/1.0.0/owsExceptionReport.xsd' % ( self . parent . context . namespaces [ 'ows' ] , ogc_schemas_base ) ) #NEWLINE# exception = etree . SubElement ( node , util . nspath_eval ( 'ows:Exception' , self . parent . context . namespaces ) , exceptionCode = text , locator = locator ) #NEWLINE# etree . SubElement ( exception , util . nspath_eval ( 'ows:ExceptionText' , self . parent . context . namespaces ) ) . text = text #NEWLINE# return node