def check_err(code):
 if (code == OGRERR_NONE):
  return
 elif (code in OGRERR_DICT):
  (e, msg) = OGRERR_DICT[code]
  raise e, msg
 else:
  raise OGRException(('Unknown error code: "%s"' % code))

def check_err ( code ) : if ( code == OGRERR_NONE ) : return elif ( code in OGRERR_DICT ) : ( e , msg ) = OGRERR_DICT [ code ] raise e , msg else : raise OGRException ( ( 'Unknown error code: "%s"' % code ) )
checks the given ogrerr .