1## @file
2# This file is used to be the warning class of ECC tool
3#
4# Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
5# This program and the accompanying materials
6# are licensed and made available under the terms and conditions of the BSD License
7# which accompanies this distribution.  The full text of the license may be found at
8# http://opensource.org/licenses/bsd-license.php
9#
10# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12#
13
14## The exception class that used to report error messages when preprocessing
15#
16# Currently the "ToolName" is set to be "ECC PP".
17#
18class Warning (Exception):
19    ## The constructor
20    #
21    #   @param  self        The object pointer
22    #   @param  Str         The message to record
23    #   @param  File        The FDF name
24    #   @param  Line        The Line number that error occurs
25    #
26    def __init__(self, Str, File = None, Line = None):
27        self.message = Str
28        self.FileName = File
29        self.LineNumber = Line
30        self.ToolName = 'ECC PP'