You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,17 @@ Fortran error handling frameworks are few and far between, and those that do exi
14
14
15
15
If you wish to use the Fortran Error Handler in a project, the simplest way to do so is to include the source files (in `src/`) at the start of your compilation setup. Source files should be compiled in this order: `ErrorInstance.f90`, `ErrorHandler.f90`, `ErrorCriteria.f90`, `Result.f90`. An example [Makefile.example](./Makefile.example) is included, which can be altered according to your compiler and preferences.
16
16
17
-
The code can also be compiled using `cmake`, which creates an executable using the `example/example_usage.f90` script as well as a library:
17
+
The code can also be compiled using `cmake`, which creates an example executable (using `example/example_usage.f90`), an executable of unit tests (using `tests/run_tests.f90`), and a library of the framework:
18
18
19
19
```bash
20
20
$ mkdir build
21
21
$ cd build
22
22
$ cmake ..
23
23
$ make
24
+
# To run the unit tests
25
+
$ ./test
26
+
# To run the example
27
+
$ ./example
24
28
```
25
29
26
30
Whether the library is shared or not is specified by the `BUILD_SHARED_LIBS` variable. If you wish to build a shared library, then pass the `BUILD_SHARED_LIBS` option as on:
@@ -29,6 +33,8 @@ Whether the library is shared or not is specified by the `BUILD_SHARED_LIBS` var
29
33
$ cmake .. -DBUILD_SHARED_LIBS=ON
30
34
```
31
35
36
+
The framework has been tested using GFortran 7 upwards and Intel Fortran 18.
"description": "Comprehensive error framework for applications requiring functional and robust error handling, utilising the power of modern object-oriented Fortran.",
Copy file name to clipboardExpand all lines: paper.md
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,37 +8,41 @@ authors:
8
8
orcid: 0000-0001-8491-4720
9
9
affiliation: 1
10
10
- name: Virginie D Keller
11
-
orcid:
11
+
orcid:0000-0003-4489-5363
12
12
affiliation: 2
13
13
- name: Richard J Williams
14
-
orcid:
14
+
orcid: 0000-0002-9876-0491
15
15
affiliation: 2
16
16
- name: Michael Hutchins
17
-
orcid:
17
+
orcid:0000-0003-3764-5331
18
18
affiliation: 2
19
19
- name: Stephen Lofts
20
-
orcid:
21
-
affilication: 1
20
+
orcid:0000-0002-3627-851X
21
+
affiliation: 1
22
22
affiliations:
23
23
- name: UK Centre for Ecology & Hydrology, Lancaster Environment Centre, Library Avenue, Bailrigg, Lancaster, LA1 4AP, UK
24
24
index: 1
25
25
- name: UK Centre for Ecology & Hydrology, Maclean Building, Benson Lane, Crowmarsh Gifford, Wallingford, OX10 8BB, UK
26
26
index: 2
27
-
date: 9 May 2020
27
+
date: 5 June 2020
28
28
bibliography: paper.bib
29
29
---
30
30
31
31
# Summary
32
32
33
33
Despite the rise of interpreted programming languages like Python and R in scientific programming, compiled languages are still the de-facto choice for computationally intensive modelling tasks, such as in climate sciences and theoretical physics. Fortran remains the top choice of many scientists, and Modern Fortran has brought great flexibility to the language in terms of object-oriented paradigms and polymorphism.
34
34
35
-
Any modelling code needs robust error checking, yet Fortran error handling frameworks to provide these utilities are few and far between, and those that do exist often implement only part of the error handling process, or rely on pre-processors [@popper:2012,@lucking:2015]. Here, we present what we believe is the most comprehensive Fortran error handling framework to date, providing a universal and comprehensive solution for applications requiring functional and robust error handling, utilising the power of modern object-oriented Fortran.
35
+
Any modelling code needs robust error checking, yet Fortran error handling frameworks to provide these utilities are few and far between, and those that do exist often implement only part of the error handling process, or rely on pre-processors [@poppe:2012;@lucking:2015]. Here, we present what we believe is the most comprehensive Fortran error handling framework to date, providing a universal and comprehensive solution for applications requiring functional and robust error handling, utilising the power of modern object-oriented Fortran.
36
36
37
37
The framework implements the whole error handling process, including separate utilities for:
38
-
- Managing the error handling environment, through an `ErrorHandler` class. This allows for queuing and triggering error events, storing pre-defined custom errors and customising error reporting.
39
-
- Working with separate error instances, through an `ErrorInstance` class. Error instances include error metadata such as error code, message and whether the error is critical or just a warning. In addition, error instances (optionally) include a user-defined trace of where the error originated, enabling rapid debugging.
40
-
- Passing errors between routines, through a `Result` class. Result objects contain a list of error instances as well as a data component, enabling errors to be returned from functions at the same time as the data which the function would traditionally return.
41
-
- Common error checking criteria, through an `ErrorCriteria` class. This defines a number of common criteria used for error checking, such as equality and non-zero assertions.
38
+
39
+
* Managing the error handling environment, through an `ErrorHandler` class. This allows for queuing and triggering error events, storing pre-defined custom errors and customising error reporting.
40
+
41
+
* Working with separate error instances, through an `ErrorInstance` class. Error instances include error metadata such as error code, message and whether the error is critical or just a warning. In addition, error instances (optionally) include a user-defined trace of where the error originated, enabling rapid debugging.
42
+
43
+
* Passing errors between routines, through a `Result` class. Result objects contain a list of error instances as well as a data component, enabling errors to be returned from functions at the same time as the data which the function would traditionally return.
44
+
45
+
* Common error checking criteria, through an `ErrorCriteria` class. This defines a number of common criteria used for error checking, such as equality and non-zero assertions.
42
46
43
47
These classes are extensible to enable, for example, custom error criteria by extending the `ErrorCriteria` class, or the passing of custom data types through extension of the `Result` object. They are designed to be modular, such that individual elements can be used separately to implement individual parts of the error handling process. The use of the whole framework enables robust error checking for the largest and most complex models and software.
0 commit comments