Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

C4D-Exceptions

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

C4D-Exceptions - Control exceptions in your systems quickly, easily and centrally

Code4Delphi

With C4D-Exceptions you can control exceptions in your systems quickly, easily and centrally

📞 Contacts

 

 

⚙️ Installation

  • Installation using the Boss:
pascal
boss install github.com/Code4Delphi/C4D-Exceptions
  • Manual installation: Open your Delphi and add the following folder to your project, under Project > Options > Building > Delphi Compiler > Search path
delphi
C4D-Exceptions\Src

🚀 Quickstart

  • Add uses to your system:
delphi
uses
  C4D.Exceptions;

When generating exceptions, enter one of the following options::

  • Information exception:
delphi
 raise ExceptionMsg.Create('My message', 'More details (optional)');
  • Warning exception:
delphi
raise ExceptionWarning.Create('My message', 'More details (optional)');
  • Error exception:
delphi
raise ExceptionError.Create('My message', 'More details (optional)');
  • Permission exception:
delphi
raise ExceptionPermission.Create('My message', 'More details (optional)');
  • Obligatory exception:
delphi
raise ExceptionObligatory.Create('My message (optional)', 'More details (optional)');
  • Empty exception:
delphi
raise ExceptionEmpty.Create('My message', 'More details (optional)');

Exception default

  • If the standard exception is reported (raise Exception.Create('Error Message');) the exception that will be displayed will be the Error exception (ExceptionError)

⌨️ Demo

  • Next to the project sources, you will find a test project, in the folder:
pascal
C4D-Exceptions\Samples\Demo01

‌

💬 Contributions / Ideas / Bug Fixes

To submit a pull request, follow these steps:

  1. Fork the project
  2. Create a new branch (git checkout -b minha-nova-funcionalidade)
  3. Make your changes
  4. Make the commit (git commit -am 'Functionality or adjustment message')
  5. Push the branch (git push origin Message about functionality or adjustment)
  6. Open a pull request