<commit_before>"""lwexceptions.py - exceptions that may be thrown by the LWApi client

   Copyright 2013 Liquid Web, Inc. 

   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/LICENSE-2.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.
"""

class NoMethodException(Exception):
  def __init__(self, method):
    message = ('Method `%s` was not found' % (method))
    super(NoMethodException, self).__init__(message)

class RequiredParamMissingException(Exception):
  def __init__(self, param, method):
    message = ('Required Parameter `%s` was not given for method `%s`' % (param, method))
    super(RequiredParamMissingException, self).__init__(message)

class BadResponseException(Exception):
  def __init__(self, code, text):
    message = ('Received bad response from the server: %d\n%s' % (code, text))
    super(BadResponseException, self).__init__(message)

# LW::Exception::Something::Bad
# if there's an 'error class' in the response, allow the method caller to decide
# what to do about it
class StormException(Exception):
  def __init__(self, error_class, full_message):
    self.error_class = error_class
    super(ResourceUnavailableException, self).__init__(full_message)
    <commit_msg>calling the wrong super class constructor... just a typo correction<commit_after>"""lwexceptions.py - exceptions that may be thrown by the LWApi client

   Copyright 2013 Liquid Web, Inc. 

   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/LICENSE-2.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.
"""

class NoMethodException(Exception):
  def __init__(self, method):
    message = ('Method `%s` was not found' % (method))
    super(NoMethodException, self).__init__(message)

class RequiredParamMissingException(Exception):
  def __init__(self, param, method):
    message = ('Required Parameter `%s` was not given for method `%s`' % (param, method))
    super(RequiredParamMissingException, self).__init__(message)

class BadResponseException(Exception):
  def __init__(self, code, text):
    message = ('Received bad response from the server: %d\n%s' % (code, text))
    super(BadResponseException, self).__init__(message)

# LW::Exception::Something::Bad
# if there's an 'error class' in the response, allow the method caller to decide
# what to do about it
class StormException(Exception):
  def __init__(self, error_class, full_message):
    self.error_class = error_class
    super(StormException, self).__init__(full_message)
    
{'fraction_non_alphanumeric': 0.08885542168674698, 'fraction_numerical': 0.004819277108433735, 'mean_word_length': 4.544240400667779, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4017550', 'n_tokens_mistral': 902, 'n_tokens_neox': 879, 'n_words': 359}