{"id":18847668,"url":"https://github.com/everythingfunctional/erloff","last_synced_at":"2026-03-19T06:42:36.279Z","repository":{"id":146073550,"uuid":"476481385","full_name":"everythingfunctional/erloff","owner":"everythingfunctional","description":"Errors and logging for fortran","archived":false,"fork":false,"pushed_at":"2023-03-24T15:24:12.000Z","size":259,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-30T13:55:23.256Z","etag":null,"topics":["error-handling","fortran","logging"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/everythingfunctional.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":"2022-03-31T21:17:33.000Z","updated_at":"2023-02-25T12:29:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"cfd701dc-75ae-44d2-b69b-1d15b25717fd","html_url":"https://github.com/everythingfunctional/erloff","commit_stats":{"total_commits":132,"total_committers":4,"mean_commits":33.0,"dds":0.3712121212121212,"last_synced_commit":"73dfdbf54dafadb42e4705c45824b93917a20965"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everythingfunctional%2Ferloff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everythingfunctional%2Ferloff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everythingfunctional%2Ferloff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/everythingfunctional%2Ferloff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/everythingfunctional","download_url":"https://codeload.github.com/everythingfunctional/erloff/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239783506,"owners_count":19696409,"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":["error-handling","fortran","logging"],"created_at":"2024-11-08T03:09:12.167Z","updated_at":"2026-01-26T12:13:46.389Z","avatar_url":"https://github.com/everythingfunctional.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# erloff\n\n[![pipeline status](https://gitlab.com/everythingfunctional/erloff/badges/main/pipeline.svg)](https://gitlab.com/everythingfunctional/erloff/commits/main)\n\nErrors and logging for fortran\n\n## Usage\n\nThe basic usage is that a procedure can have intent(out) message and/or error list arguments, or as a component of it's return value.\nIf inside that procedure, you would like to log a message or signal an error, simply append a message to the appropriate list.\nThe caller of that procedure is then responsible for either dealing with the errors or messages, or appending them to its own lists.\nA detailed references on the functionality of erloff is available in\n[the developer documentation](https://everythingfunctional.gitlab.io/erloff).\n\n### Creating a Message\n\nThere are 5 types of messages supported.\nDebug, info, warning, fatal and internal messages.\nThe messages all include the module and procedure they originated from,\nas well as all modules and procedures they come through on the way back up the call stack.\nThey also include a message, and optionally a tag indicating the type of message.\nDebug messages also contain a level that can be used for filtering them later.\nCreating a message for output will typically look something like the following:\n\n```Fortran\nmessages = messages%with_message_appended(info_t( \u0026\n        module_t(\"some_m\"), procedure_t(\"some\"), \"Hello, World!\"))\n```\n\nNote that an `error_list_t` will only hold messages of type fatal or internal.\n\n### Dealing With Messages From a Called Procedure\n\nAny messages produced should be returned from the procedure, and **they don't go anywhere else**,\nso it is the responsibility of the calling procedure to deal with them appropriately.\nMost of the time that procedure will just return them as part of it's own outputs like so:\n\n```Fortran\nmessages = messages%with_messages_appended( \u0026\n        other_messages, module_t(\"some_m\"), procedure_t(\"some\"))\n```\n\nIt's also possible to interrogate and filter the messages.\nSo, at some point in your program you'll probably have something like the following to print them out.\n\n```Fortran\nto_output = messages.ofType.INFO_TYPE\ncall put_line(to_output%to_string())\n```\n\n### Concurrency\n\nThis type of error handling and logging system makes it possible to deal with errors and messages and have deterministic concurrency.\nYou could basically have something like the following and still be guaranteed that any messages will always come out in the same order.\n\n```Fortran\ninteger :: input(n), output(n)\ntype(message_list_t) :: message_lists(n)\n\ncall do_something_expensive_elementally(input, output, message_lists)\ndo i = 1, n\n    messages = messages%with_messages_appended( \u0026\n            message_lists(i), module_t(\"some_m\"), procedure_t(\"some\"))\nend do\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feverythingfunctional%2Ferloff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feverythingfunctional%2Ferloff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feverythingfunctional%2Ferloff/lists"}