TErrorHandlerUnit.pas 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {
  2. Copyright 2005-2006 Log4Delphi Project
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. }
  13. {*----------------------------------------------------------------------------
  14. Contains the TErrorHandler class.
  15. @version 0.5
  16. @author <a href="mailto:tcmiller@users.sourceforge.net">Trevor Miller</a>
  17. ----------------------------------------------------------------------------}
  18. unit TErrorHandlerUnit;
  19. {$ifdef fpc}
  20. {$mode objfpc}
  21. {$h+}
  22. {$endif}
  23. interface
  24. uses
  25. SysUtils;
  26. type
  27. {*----------------------------------------------------------------------------
  28. Appenders may delegate their error handling to ErrorHandlers.
  29. ----------------------------------------------------------------------------}
  30. TErrorHandler = class (TObject)
  31. public
  32. procedure Error(const AMsg : String); Overload; Virtual; Abstract;
  33. procedure Error(const AMsg: String; AEx : Exception); Overload;
  34. Virtual; Abstract;
  35. procedure SetAppender(const AAppenderName : String); Virtual; Abstract;
  36. end;
  37. implementation
  38. end.