from typing import Optional


class NReportsException(Exception):

    def __init__(
        self,                       # type: NReportsException
        message,                    # type: str
        error_code,                 # type: int
        translated_message=None,    # type: Optional[str]
    ):
        # type: (...) -> None
        super(NReportsException, self).__init__(message)

        self.error_code = error_code
        self.error_message = message
        self.translated_message = translated_message

    def __str__(
        self,        # type: NReportsException
    ):
        # type: (...) -> str

        return "errorCode: {}, errorMessage: {}".format(self.error_code, self.error_message)
