r76124 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76123‎ | r76124 | r76125 >
Date:18:50, 5 November 2010
Author:diederik
Status:deferred
Tags:
Comment:
PlatformNotSupportedException and FileNotFoundException.
Modified paths:
  • /trunk/tools/editor_trends/utils/exceptions.py (added) (history)

Diff [purge]

Index: trunk/tools/editor_trends/utils/exceptions.py
@@ -0,0 +1,37 @@
 2+#!/usr/bin/python
 3+# -*- coding: utf-8 -*-
 4+'''
 5+Copyright (C) 2010 by Diederik van Liere (dvanliere@gmail.com)
 6+This program is free software; you can redistribute it and/or
 7+modify it under the terms of the GNU General Public License version 2
 8+as published by the Free Software Foundation.
 9+This program is distributed in the hope that it will be useful,
 10+but WITHOUT ANY WARRANTY; without even the implied warranty of
 11+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 12+See the GNU General Public License for more details, at
 13+http://www.fsf.org/licenses/gpl.html
 14+'''
 15+
 16+__author__ = '''\n'''.join(['Diederik van Liere (dvanliere@gmail.com)', ])
 17+__author__email = 'dvanliere at gmail dot com'
 18+__date__ = '2010-11-05'
 19+__version__ = '0.1'
 20+
 21+
 22+class Error(Exception):
 23+ '''Base class for exceptions in this module.'''
 24+ pass
 25+
 26+class FileNotFoundException(Error):
 27+ def __init__(self, file):
 28+ self.file = file
 29+
 30+ def __str__(self):
 31+ print 'The file %s was not found. Please make sure your path is up-to-date.' % self.file
 32+
 33+class PlatformNotSupportedError(Error):
 34+ def __init__(self, platform):
 35+ self.platform = platform
 36+
 37+ def __str__(self):
 38+ print 'Platform %s is not supported' % self.platform
Property changes on: trunk/tools/editor_trends/utils/exceptions.py
___________________________________________________________________
Added: svn:eol-style
139 + native

Status & tagging log