{"id":25456893,"url":"https://github.com/victorsndvg/forex","last_synced_at":"2026-01-21T09:32:16.184Z","repository":{"id":77204286,"uuid":"57105929","full_name":"victorsndvg/ForEx","owner":"victorsndvg","description":"Fortran User Defined Exceptions Handler","archived":false,"fork":false,"pushed_at":"2023-04-30T19:40:46.000Z","size":34,"stargazers_count":18,"open_issues_count":2,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-01-29T08:48:34.402Z","etag":null,"topics":["exception-handler","experimental","fortran","object-oriented"],"latest_commit_sha":null,"homepage":null,"language":"FORTRAN","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/victorsndvg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-04-26T07:07:15.000Z","updated_at":"2022-09-29T13:07:56.000Z","dependencies_parsed_at":"2023-09-25T00:59:19.018Z","dependency_job_id":null,"html_url":"https://github.com/victorsndvg/ForEx","commit_stats":{"total_commits":19,"total_committers":3,"mean_commits":6.333333333333333,"dds":"0.21052631578947367","last_synced_commit":"163512320455b4f3740249cd143a1207261dc4a5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorsndvg%2FForEx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorsndvg%2FForEx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorsndvg%2FForEx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorsndvg%2FForEx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/victorsndvg","download_url":"https://codeload.github.com/victorsndvg/ForEx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239394674,"owners_count":19631122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exception-handler","experimental","fortran","object-oriented"],"created_at":"2025-02-18T01:51:37.697Z","updated_at":"2025-11-02T10:30:34.032Z","avatar_url":"https://github.com/victorsndvg.png","language":"FORTRAN","funding_links":[],"categories":[],"sub_categories":[],"readme":"#ForEx\n\n**For**tran User Defined **Ex**ceptions Handler\n\n**Experimental Code:** *Use it carefully! still under development*\n\n[![Build Status](https://travis-ci.org/victorsndvg/ForEx.svg?branch=master)](https://travis-ci.org/victorsndvg/ForEx.svg)\n[![codecov.io](https://codecov.io/github/victorsndvg/ForEx/coverage.svg?branch=master)](https://codecov.io/github/victorsndvg/ForEx?branch=master)\n\n##License\n\n[![License](https://img.shields.io/badge/license-GNU%20LESSER%20GENERAL%20PUBLIC%20LICENSE%20v3%2C%20LGPLv3-red.svg)](http://www.gnu.org/licenses/lgpl-3.0.txt)\n\n##What is ForEx?\n\n**ForEx** is fortran 2003 project taking advance of the [C preprocessor](https://gcc.gnu.org/onlinedocs/cpp/) capabilities in order to emulate exception handling.\n\n##Features\n\n- **Exception hierarchy:** **ForEx** can handle any error object extended from the **Exception** base class. \n- **Local flow control:** throwing an exception changes the local flow. **THROW** performs local jumps to the end of the **TRY** frame or **FINALLY**.\n- **Global handling:** the exception stack is a global object under the singleton pattern.\n- **Single THROW call per scope:**\n   - Single throw call per local **TRY** scope.\n   - Single throw call per local **CATCH** scope.\n   - Single throw call per local **FINALLY** scope.\n- **Re-throwing:** a exception can be raised again in the **CATCH** scope.\n- **Re-throwing Backtrace:** an exception saves the stack of contexts where it has been throwed.\n- **Handle throwed exceptions:** **CATCH** iterate over all the exceptions looking for the first that matches the same *class*.\n- **CATCH precedence:** multiple **CATCH** calls in the same **TRY** frame are executed sequencially.\n- **Automatic exception stack cleaning when CATCH:** if several exceptions has been thrown along the program, only one of them will be handled in the next **CATCH** call.\n- **Customizable catching action:** Exception *class* contains the **Catch** procedure to customize the action performed when cathing it.\n- **Automatic Backtrace of non handled exceptions:** going out of the main **TRY**/**ENDTRY** scope with non handled exceptions in the stack causes *exception backtrace flush*.\n\n##How to get ForEx\n\n```git clone https://github.com/victorsndvg/Forex.git ```\n\n##Compilation\n\n**ForEx** compile with GNU Fortran compiler 5.1 (and newer versions) and Intel Fortran compiler 15.0.1 (and newer versions).\n\n**ForEx** uses [CMake](https://cmake.org/) as a portable compilation system. \n\nThe easiest way to compile **ForEx** under Linux is:\n\n```\n$ cd ForEx\n$ mkdir build\n$ cd build\n$ cmake ../\n$ make\n```\n\n*To compile ForEx under Windows use de equivalent commands*\n\nRemember, **ForEx** take advantage of the [C preprocessor](https://gcc.gnu.org/onlinedocs/cpp/). To include it in your project, you have to add the preprocessor flags while compiling.\nPreprocesor flags depending on the compiler vendor:\n- GNU Fortran: -cpp\n- Intel Fortran: -fpp\n- IBM XLF: -qsuffix=f=f90:cpp=f90\n\n###Using ForEx in your program\n\n```fortran\nprogram test\nUSE ForEx\n\nimplicit none\n#include \"ExceptionHandler.i90\"\n\nTRY\n    ! Variable allocation\n    if(Error) then\n        THROW(Exception(Code=-1, Message='An error message')\n    endif\nCATCH(Exception, Ex)\n    call Ex%Print()\nFINALLY\n    ! Variable deallocation\nENDTRY\n\nend program test\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorsndvg%2Fforex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictorsndvg%2Fforex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorsndvg%2Fforex/lists"}