Skip to content

Commit 84057f3

Browse files
committed
updated readme for new error functions.
1 parent 7eca780 commit 84057f3

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,17 @@ call me%destroy()
6464

6565
### Error handling
6666

67-
Errors are reported using the `error_msg` output of the `parse` and `evaluate`
68-
methods. This is variable of type `list_of_errors`, which is also exported
69-
by the `function_parser` module.
67+
Errors can be reported by both the `parse` and `evaluate`
68+
class methods. To check for errors, use the `error` method, and to print them use the `print_errors` method:
7069

71-
* An error in the function parsing step leads to a detailed error message
72-
(Type and position of error) returned in the `error_msg` output of the
73-
`parse` method.
74-
75-
* An error during function evaluation returns a function value of 0.0 and
76-
an error message returned in the `error_msg` output of the
77-
`evaluate` method.
70+
```fortran
71+
if (me%error()) then
72+
me%print_errors(output_unit)
73+
end if
74+
```
7875

79-
To check if a `list_of_errors` class contains a message, use the
80-
`has_errors` method.
81-
The `print` method can also be used to print the error messages.
76+
An error in the function parsing step leads to a detailed error message
77+
(type and position of error). An error during function evaluation returns a function value of 0.0.
8278

8379
### Function string syntax
8480

@@ -125,5 +121,6 @@ by a valid exponent.
125121
from [here](http://fparser.sourceforge.net).
126122
* The function parser concept is based on a C++ class library written by
127123
Juha Nieminen <warp@iki.fi> available from [here](http://warp.povusers.org/FunctionParser/).
128-
* The code has been updated to Fortran 2008 by Jacob Williams. Development
124+
* The original code has been updated to Fortran 2008 by Jacob Williams. Development
129125
continues on [GitHub](https://github.com/jacobwilliams/fortran_function_parser).
126+
* Note that another refactoring of the original code is available [here](https://github.com/jacopo-chevallard/FortranParser).

0 commit comments

Comments
 (0)