Commit 4862f806 authored by Esquis Benjamin's avatar Esquis Benjamin Committed by Julie Brossard
Browse files

Resolve "Add custom return code mecanism"

parent 15372335
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Copyright (C) 2016-2020 Centre National d'Etudes Spatiales (CNES), CSSI, CESBIO All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
MAJA_EXIT_SUCESS = 0
MAJA_MISSING_ANGLES = 133
\ No newline at end of file
......@@ -17,10 +17,12 @@ import logging
from os import path as p
from datetime import timedelta, datetime
from StartMaja.Common import FileSystem
from StartMaja.Common import Constants
from StartMaja.Chain import AuxFile, GippFile, Product
from StartMaja.Chain.Workplan import Workplan, Nominal, Backward, Init
class StartMaja(object):
"""
Run the MAJA processor
......@@ -499,7 +501,12 @@ class StartMaja(object):
logger.info("Beginning workplan execution.")
for i, wp in enumerate(workplans):
logger.info("Executing workplan #%s/%s" % (i+1, len(workplans)))
wp.execute(self.maja, self.dtm, self.gipp, self.userconf)
return_code = wp.execute(self.maja, self.dtm, self.gipp, self.userconf)
if return_code != Constants.MAJA_EXIT_SUCESS and return_code != Constants.MAJA_MISSING_ANGLES:
logger.error("Maja returned an error exit code : "+str(return_code)+" see Maja documentation")
raise RuntimeError("Maja returned an error exit code : "+str(return_code)+" see Maja documentation")
if return_code == Constants.MAJA_MISSING_ANGLES:
logger.warning("Maja : missing angles in a product, skipping the product")
logger.info("=============Start_Maja v%s finished=============" % self.version)
pass
......
......@@ -249,6 +249,84 @@ add_test(NAME pyTv-S2-L2BACKWARD-011-F-N-SENTINEL2_MUSCATE-GENERAL_COMP_ASCII
)
# Error Cases
add_test(NAME pyTv-S2-L2INIT-110-SENTINEL2-MUSCATE-GENERAL_ERRORNODEM
COMMAND ${TEST_DRIVER}
Execute
${PYTHON_EXECUTABLE} ${ORCHESTRATOR}/launcher/maja.py
"--input" "${MAJADATA_TV_SENTINEL2_MUSCATE_INPUT}/S2-V-L2INIT-110-F-N-SENTINEL2_MUSCATE-ERRORNODEM/"
"--output" "${MAJA_TEST_OUTPUT_ROOT}/TV_SENTINEL2_MUSCATE/SENTINEL2_MUSCATE_INIT"
"-m" "L2INIT"
"-l" "DEBUG"
"--stylesheet" "${MAJADATA_TV_SENTINEL2_MUSCATE_INPUT}/S2-V-L2INIT-110-F-N-SENTINEL2_MUSCATE-ERRORNODEM/styleSheet_Overloading_GIPPs_Values.xsl"
)
SET_TESTS_PROPERTIES(pyTv-S2-L2INIT-110-SENTINEL2-MUSCATE-GENERAL_ERRORNODEM PROPERTIES WILL_FAIL true)
add_test(NAME pyTv-S2-L2INIT-111-SENTINEL2-MUSCATE-GENERAL_ERRORNOGIPP
COMMAND ${TEST_DRIVER}
Execute
${PYTHON_EXECUTABLE} ${ORCHESTRATOR}/launcher/maja.py
"--input" "${MAJADATA_TV_SENTINEL2_MUSCATE_INPUT}/S2-V-L2INIT-111-F-N-SENTINEL2_MUSCATE-ERRORNOGIPP/"
"--output" "${MAJA_TEST_OUTPUT_ROOT}/TV_SENTINEL2_MUSCATE/SENTINEL2_MUSCATE_INIT"
"-m" "L2INIT"
"-l" "DEBUG"
"--stylesheet" "${MAJADATA_TV_SENTINEL2_MUSCATE_INPUT}/S2-V-L2INIT-111-F-N-SENTINEL2_MUSCATE-ERRORNOGIPP/styleSheet_Overloading_GIPPs_Values.xsl"
)
SET_TESTS_PROPERTIES(pyTv-S2-L2INIT-111-SENTINEL2-MUSCATE-GENERAL_ERRORNOGIPP PROPERTIES WILL_FAIL true)
add_test(NAME pyTv-S2-L2INIT-112-SENTINEL2-MUSCATE-GENERAL_ERRORNOPRODUCT
COMMAND ${TEST_DRIVER}
Execute
${PYTHON_EXECUTABLE} ${ORCHESTRATOR}/launcher/maja.py
"--input" "${MAJADATA_TV_SENTINEL2_MUSCATE_INPUT}/S2-V-L2INIT-112-F-N-SENTINEL2_MUSCATE-ERRORNOPRODUCT/"
"--output" "${MAJA_TEST_OUTPUT_ROOT}/TV_SENTINEL2_MUSCATE/SENTINEL2_MUSCATE_INIT"
"-m" "L2INIT"
"-l" "DEBUG"
"--stylesheet" "${MAJADATA_TV_SENTINEL2_MUSCATE_INPUT}/S2-V-L2INIT-112-F-N-SENTINEL2_MUSCATE-ERRORNOPRODUCT/styleSheet_Overloading_GIPPs_Values.xsl"
)
SET_TESTS_PROPERTIES(pyTv-S2-L2INIT-112-SENTINEL2-MUSCATE-GENERAL_ERRORNOPRODUCT PROPERTIES WILL_FAIL true)
add_test(NAME pyTv-S2-L2INIT-113-SENTINEL2-MUSCATE-GENERAL_ERRORCORRUPTCONF
COMMAND ${TEST_DRIVER}
Execute
${PYTHON_EXECUTABLE} ${ORCHESTRATOR}/launcher/maja.py
"--input" "${MAJADATA_TV_SENTINEL2_MUSCATE_INPUT}/S2-V-L2INIT-011-F-N-SENTINEL2_MUSCATE-GENERAL/"
"--output" "${MAJA_TEST_OUTPUT_ROOT}/TV_SENTINEL2_MUSCATE/SENTINEL2_MUSCATE_INIT"
"-m" "L2INIT"
"-l" "DEBUG"
"--stylesheet" "${MAJADATA_TV_SENTINEL2_MUSCATE_INPUT}/S2-V-L2INIT-113-F-N-SENTINEL2_MUSCATE-ERRORCORRUPTCONF/styleSheet_Overloading_GIPPs_Values.xsl"
)
SET_TESTS_PROPERTIES(pyTv-S2-L2INIT-113-SENTINEL2-MUSCATE-GENERAL_ERRORCORRUPTCONF PROPERTIES WILL_FAIL true)
add_test(NAME pyTv-S2-L2INIT-114-SENTINEL2-MUSCATE-GENERAL_ERRORCORRUPTGIPP
COMMAND ${TEST_DRIVER}
Execute
${PYTHON_EXECUTABLE} ${ORCHESTRATOR}/launcher/maja.py
"--input" "${MAJADATA_TV_SENTINEL2_MUSCATE_INPUT}/S2-V-L2INIT-011-F-N-SENTINEL2_MUSCATE-GENERAL/"
"--output" "${MAJA_TEST_OUTPUT_ROOT}/TV_SENTINEL2_MUSCATE/SENTINEL2_MUSCATE_INIT"
"-m" "L2INIT"
"-l" "DEBUG"
"--stylesheet" "${MAJADATA_TV_SENTINEL2_MUSCATE_INPUT}/S2-V-L2INIT-114-F-N-SENTINEL2_MUSCATE-ERRORCORRUPTGIPP/styleSheet_Overloading_GIPPs_Values.xsl"
)
SET_TESTS_PROPERTIES(pyTv-S2-L2INIT-114-SENTINEL2-MUSCATE-GENERAL_ERRORCORRUPTGIPP PROPERTIES WILL_FAIL true)
add_test(NAME pyTv-S2-L2INIT-115-SENTINEL2-MUSCATE-GENERAL_ERRORVIEWANGLE
COMMAND ${TEST_DRIVER}
Execute
${PYTHON_EXECUTABLE} ${ORCHESTRATOR}/launcher/maja.py
"--input" "${MAJADATA_TV_SENTINEL2_MUSCATE_INPUT}/S2-V-L2INIT-115-F-N-SENTINEL2_MUSCATE-ERRORVIEWANGLE/"
"--output" "${MAJA_TEST_OUTPUT_ROOT}/TV_SENTINEL2_MUSCATE/SENTINEL2_MUSCATE_ERRORVIEWANGLE"
"-m" "L2INIT"
"-l" "DEBUG"
"--stylesheet" "${MAJADATA_TV_SENTINEL2_MUSCATE_INPUT}/S2-V-L2INIT-115-F-N-SENTINEL2_MUSCATE-ERRORVIEWANGLE/styleSheet_Overloading_GIPPs_Values.xsl"
)
SET_TESTS_PROPERTIES(pyTv-S2-L2INIT-115-SENTINEL2-MUSCATE-GENERAL_ERRORVIEWANGLE PROPERTIES WILL_FAIL true)
###### End error cases ##############
add_test(NAME pyTv-S2-L2NOMINAL-011-F-N-SENTINEL2_MUSCATE-MIXRES_CHAIN
COMMAND ${TEST_DRIVER}
Execute
......
......@@ -36,9 +36,7 @@ It defines method mandatory for a processor
###################################################################################################
"""
import os
import math
from orchestrator.common.maja_exceptions import MajaProcessingError
def grid_to_angle(grid_point):
......
......@@ -56,8 +56,6 @@
# ---------#
import getopt
import sys
import os
import shutil
import numpy as np
import os
from orchestrator.common.logger.maja_logging import configure_logger
......
......@@ -36,7 +36,7 @@ It defines method mandatory for a processor
###################################################################################################
"""
from orchestrator.common.maja_exceptions import MajaBusinessException
from orchestrator.common.maja_exceptions import MajaAlgorithmException
from orchestrator.common.logger.maja_logging import configure_logger
LOGGER = configure_logger(__name__)
......@@ -69,7 +69,7 @@ def compute_origin(in_origin, in_spacing, out_spacing, mode):
# Check the sign of the input and output spacing
if ((in_spacing[0] > 0) and (out_spacing[0] < 0)) or ((in_spacing[0] < 0) and (out_spacing[0] > 0)) \
or ((in_spacing[1] > 0) and (out_spacing[1] < 0)) or ((in_spacing[1] < 0) and (out_spacing[1] > 0)):
raise MajaBusinessException(
raise MajaAlgorithmException(
"For resampling, input and output spacing must have the same sign for each dimension!")
# --------------------------------------------------------------------------------------
......@@ -89,6 +89,6 @@ def compute_origin(in_origin, in_spacing, out_spacing, mode):
# --------------------------------------------------------------------------------------
pass
else:
raise MajaBusinessException("Unknown ResamplerHelper mode.")
raise MajaAlgorithmException("Unknown ResamplerHelper mode.")
LOGGER.debug(" - Output image origin: [%s;%s]", outOrigin[0], outOrigin[1])
return outOrigin
......@@ -37,7 +37,6 @@ It defines classes_and_methods
###################################################################################################
"""
import orchestrator.common.conf.maja_xml_camera_admin_config as camera_admin_conf
from orchestrator.common.conf.maja_xml_camera_admin_config import *
from orchestrator.common.maja_exceptions import MajaDataException
from orchestrator.common.logger.maja_logging import configure_logger
......
......@@ -37,7 +37,7 @@ It defines classes_and_methods
###################################################################################################
"""
from orchestrator.common.maja_exceptions import MajaBusinessException
from orchestrator.common.maja_exceptions import MajaDataException
class ReadL1Mode:
......@@ -61,7 +61,7 @@ class AOTEstimation:
elif str_name == "SPECTROTEMPORAL":
method = AOTEstimation.SPECTROTEMPORAL
else:
raise MajaBusinessException("Utilities:GetAOTMethod: The AOT method " + str_name + "does not exist.")
raise MajaDataException("Utilities:GetAOTMethod: The AOT method " + str_name + "does not exist.")
return method
......
......@@ -40,7 +40,6 @@ from orchestrator.common.logger.maja_logging import configure_logger
from orchestrator.common.gipp_utils import uncompress_dbl_product
from orchestrator.common.earth_explorer.earth_explorer_xml_file_handler import EarthExplorerXMLFileHandler
from orchestrator.cots.otb.algorithms.otb_multiply_by_scalar import multiply_by_scalar
from orchestrator.cots.otb.algorithms.otb_extract_roi import extract_roi
from orchestrator.cots.otb.algorithms.otb_stats import stats
from orchestrator.cots.gdal.gdal_dataset_info import GdalDatasetInfo
from orchestrator.common.maja_exceptions import MajaDataException
......
......@@ -42,7 +42,7 @@ It defines classes_and_methods
###################################################################################################
"""
from orchestrator.common.maja_exceptions import MajaDriverException
from orchestrator.common.maja_exceptions import MajaDataException
import orchestrator.common.xml_tools as xml_tools
GIPP_COMM_HANDLER_XPATH = {
......@@ -312,7 +312,7 @@ class GippL2COMMEarthExplorerXMLFileHandler(object):
if check:
return None
else:
raise MajaDriverException("No " + key + " in L2COMM dictionnary")
raise MajaDataException("No " + key + " in GIPP L2COMM dictionnary")
def get_value_f(self, key, check=False):
return float(self.get_value(key, check))
......
......@@ -37,7 +37,7 @@ It defines classes_and_methods
###################################################################################################
"""
from orchestrator.common.maja_exceptions import MajaDriverException
from orchestrator.common.maja_exceptions import MajaDataException
from orchestrator.common.xml_tools import get_root_xml, get_only_value
GIPP_SITE_HANDLER_XPATH = {
......@@ -65,7 +65,7 @@ class GippL2SITEEarthExplorerXMLFileHandler(object):
if check:
return None
else:
raise MajaDriverException("No " + key + " in L2SITE dictionnary")
raise MajaDataException("No " + key + " in L2SITE dictionnary")
if __name__ == '__main__':
......
......@@ -38,10 +38,8 @@ It defines classes_and_methods
"""
import orchestrator.common.xml_tools as xml_tools
from orchestrator.common.logger.maja_logging import configure_logger
from orchestrator.common.earth_explorer.earth_explorer_xml_file_handler import EarthExplorerXMLFileHandler
LOGGER = configure_logger(__name__)
REFLECTANCE_QUANTIF_VALUE = "//Earth_Explorer_Header/Variable_Header/Specific_Product_Header/Product_Information/" + \
......
......@@ -35,7 +35,7 @@ It defines classes_and_methods
###################################################################################################
"""
from orchestrator.common.maja_exceptions import MajaProcessingError
from orchestrator.common.maja_exceptions import MajaDataException
from orchestrator.common.maja_utils import get_test_mode
from orchestrator.common.system_utils import launch_command
import glob
......@@ -44,7 +44,7 @@ import errno
import shutil
from orchestrator.common.logger.maja_logging import configure_logger
from orchestrator.common.maja_exceptions import MajaDataException
from orchestrator.common.maja_exceptions import MajaProcessingException
LOGGER = configure_logger(__name__)
......@@ -89,7 +89,7 @@ def maja_get_subdirectories(search_directory):
def fully_resolve(a_path, check_existence=False):
resolved = os.path.expanduser(os.path.expandvars(os.path.normpath(a_path)))
if "$" in resolved:
raise MajaProcessingError("Environment variable not resolved in %s" % resolved)
raise MajaProcessingException("Environment variable not resolved in %s" % resolved)
if check_existence:
if not os.path.exists(resolved):
raise MajaDataException("File not found %s" % resolved)
......@@ -161,7 +161,7 @@ def uncompress_file(src, dst):
# TODO: TBC MOve status to post ?
# TODO: see status management by system command executor
if status != 0:
raise MajaDataException("Error running {}. Exit code {}".format(command_line, status))
raise MajaProcessingException("Error running {}. Exit code {}".format(command_line, status))
def create_directory(dir_name):
......@@ -170,7 +170,7 @@ def create_directory(dir_name):
os.makedirs(dir_name)
except OSError as e:
if e.errno != errno.EEXIST:
raise MajaProcessingError("Error while creatind directory : "+dir_name)
raise MajaProcessingException("Error while creatind directory : "+dir_name)
def provide_filename(directory, basefilename, extentionfilename):
......
......@@ -100,6 +100,8 @@ def uncompress_dbl_product(dbl_filename):
elif os.path.isfile(dbl_bin):
LOGGER.debug("The DBL product <" + dbl_bin + "> is already uncompressed (.DBL.BIN file already exists).")
else:
if not os.path.exists(dbl_filename):
raise MajaDataException(dbl_filename + " doesn't exists !!!!")
uncompress_file(dbl_filename, os.path.dirname(dbl_filename))
......
......@@ -39,7 +39,6 @@ It defines classes_and_methods
from orchestrator.common.logger.maja_logging import configure_logger
import orchestrator.common.date_utils as date_utils
import orchestrator.common.xml_tools as xml_tools
from orchestrator.common.maja_exceptions import *
from orchestrator.cots.otb.otb_app_handler import OtbAppHandler
from orchestrator.common.earth_explorer.gipp_cams_earch_explorer_xml_file_handler import GippCAMSEarthExplorerXMLFileHandler
from orchestrator.common.interfaces.maja_xml_app_cams import *
......
......@@ -72,21 +72,26 @@ class PointXY:
def __init__(self, vx=0.0, vy=0.0):
self.x = vx
self.y = vy
def __add__(self, b):
return PointXY(self.x + b.x, self.y + b.y)
def __sub__(self, b):
return PointXY(self.x - b.x, self.y - b.y)
def __mul__(self, c):
if isinstance(c,PointXY):
return PointXY(self.x * c.x, self.y * c.y)
else:
return PointXY(self.x * c, self.y * c)
def __rmul__(self,c):
if isinstance(c,PointXY):
return PointXY(c.x * self.x, c.y * self.y)
else:
return PointXY(c * self.x, c * self.y)
class Corner:
def __init__(self):
......
......@@ -36,115 +36,202 @@ It defines classes_and_methods
###################################################################################################
"""
import orchestrator.common.maja_exit_codes as maja_exit_codes
class MajaException(Exception):
class MajaException(Exception):
def __init__(self, msg):
super(MajaException, self).__init__(msg)
self._exit_code = maja_exit_codes.MAJA_BASE_ERROR
super(MajaException, self).__init__(type(self).__name__ + " : " + msg)
def get_exit_code(self):
return self._exit_code
class MajaDriverException(MajaException):
class MajaProcessingException(MajaException):
"""
Exception raised by an error reading a product with maja drivers
Exception raised by the main program
"""
pass
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_PROCESSING_ERROR
super(MajaProcessingException, self).__init__(msg)
class MajaDataException(MajaException):
"""
Exception raised when there is a problem to read or write a file
Exception raised when there is a problem to find a file
"""
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_DATA_ERROR
super(MajaDataException, self).__init__(msg)
class MajaDataMissingAngleException(MajaException):
"""
Exception raised when there is a problem to find a file
"""
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_DATA_MISSING_ANGLES_ERROR
super(MajaDataMissingAngleException, self).__init__(msg)
class MajaChainException(MajaException):
"""
pass
Exception raised when there is a problem in a chain
"""
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_CHAIN_ERROR
super(MajaChainException, self).__init__(msg)
class MajaModuleException(MajaException):
"""
Exception raised when there is a problem to read or write a file
Exception raised when there is a problem in a module
"""
pass
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_MODULE_ERROR
super(MajaModuleException, self).__init__(msg)
class MajaNotYetImplemented(NotImplementedError):
class MajaFactoryException(MajaException):
"""
Exception raised when entering a not yet implemented functionality
Exception raised when there is a problem in a module
"""
pass
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_FACTORY_ERROR
super(MajaFactoryException, self).__init__(msg)
class MajaProcessingError(MajaException):
class MajaNotYetImplementedException(MajaException):
"""
Exception raised when process crashed during run
Exception raised when entering a not yet implemented functionality
"""
pass
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_NOT_IMPLEMENTED_ERROR
super(MajaNotYetImplementedException, self).__init__(msg)
class MajaIOError(IOError):
class MajaIOException(MajaDataException):
"""
Exception raised when there is a problem to read or write a file
"""
pass
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_IO_ERROR
super(MajaIOException, self).__init__(msg)
class MajaExceptionAlgorithm(ArithmeticError):
class MajaAlgorithmException(MajaException):
"""
Exception raised when there is a problem to read or write a file
"""
pass
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_ALGORITHM_ERROR
super(MajaAlgorithmException, self).__init__(msg)
class MajaPluginBaseException(MajaException):
"""
class MajaExceptionPluginBase(MajaException):
"""
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_PLUGIN_BASE_ERROR
super(MajaPluginBaseException, self).__init__(msg)
class MajaPluginSentinel2Exception(MajaPluginBaseException):
"""
pass
"""
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_PLUGIN_SENTINEL2_ERROR
super(MajaPluginSentinel2Exception, self).__init__(msg)
class MajaExceptionPluginSentinel2(MajaExceptionPluginBase):
class MajaPluginMuscateException(MajaPluginBaseException):
"""
"""
pass
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_PLUGIN_MUSCATE_ERROR
super(MajaPluginMuscateException, self).__init__(msg)
class MajaExceptionPluginSentinel2Muscate(MajaExceptionPluginBase):
class MajaPluginEarthExplorerException(MajaPluginBaseException):
"""
"""
pass
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_PLUGIN_EARTH_EXPLORER_ERROR
super(MajaPluginEarthExplorerException, self).__init__(msg)
class MajaExceptionPluginVenus(MajaExceptionPluginBase):
class MajaPluginSentinel2MuscateException(MajaPluginMuscateException):
"""
"""
pass
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_PLUGIN_SENTINEL2_MUSCATE_ERROR
super(MajaPluginSentinel2MuscateException, self).__init__(msg)
class MajaPluginVenusMuscateException(MajaPluginMuscateException):
"""
"""
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_PLUGIN_VENUS_MUSCATE_ERROR
super(MajaPluginVenusMuscateException, self).__init__(msg)
class MajaExceptionPluginMuscate(MajaExceptionPluginBase):
class MajaPluginVenusException(MajaPluginBaseException):
"""
"""
pass
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_PLUGIN_VENUS_MUSCATE_ERROR
super(MajaPluginVenusException, self).__init__(msg)
class MajaBusinessException(MajaException):
class MajaPluginLandsat8Exception(MajaPluginBaseException):
"""
"""
pass
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_PLUGIN_LANDSAT8_ERROR
super(MajaPluginLandsat8Exception, self).__init__(msg)
class MajaChainException(MajaException):
class MajaCotsException(MajaException):
"""
"""
pass
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_COTS_ERROR
super(MajaCotsException, self).__init__(msg)
class MajaOgrException(MajaException):
class MajaOTBCotsException(MajaCotsException):
"""
"""
pass
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_OTB_COTS_ERROR
super(MajaOTBCotsException, self).__init__(msg)
class MajaOGRCotsException(MajaCotsException):
"""
"""
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_PROCESSING_ERROR
super(MajaOGRCotsException, self).__init__(msg)
class MajaGDALCotsException(MajaCotsException):
"""
"""
def __init__(self, msg):
self._exit_code = maja_exit_codes.MAJA_PROCESSING_ERROR
super(MajaGDALCotsException, self).__init__(msg)
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 Centre National d'Etudes Spatiales (CNES)
#