Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
exceptions.py39 linesDownload Raw Back to msal
1#------------------------------------------------------------------------------2#3# Copyright (c) Microsoft Corporation.4# All rights reserved.5#6# This code is licensed under the MIT License.7#8# Permission is hereby granted, free of charge, to any person obtaining a copy9# of this software and associated documentation files(the "Software"), to deal10# in the Software without restriction, including without limitation the rights11# to use, copy, modify, merge, publish, distribute, sublicense, and / or sell12# copies of the Software, and to permit persons to whom the Software is13# furnished to do so, subject to the following conditions :14#15# The above copyright notice and this permission notice shall be included in16# all copies or substantial portions of the Software.17#18# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR19# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,20# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE21# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER22# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,23# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN24# THE SOFTWARE.25#26#------------------------------------------------------------------------------27 28class MsalError(Exception):29    # Define the template in Unicode to accommodate possible Unicode variables30    msg = u'An unspecified error'31 32    def __init__(self, *args, **kwargs):33        super(MsalError, self).__init__(self.msg.format(**kwargs), *args)34        self.kwargs = kwargs35 36class MsalServiceError(MsalError):37    msg = u"{error}: {error_description}"38 39 
codekingpro/portable-devtools · Team Ai