Skip to content

Commit

Permalink
using error stop that is standard Fortran
Browse files Browse the repository at this point in the history
  • Loading branch information
fedebenelli committed Mar 23, 2024
1 parent 49362fb commit 1ca415b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/properties/scalar_property.f90
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impure elemental subroutine scalar_from_json(self, name, json_str, path)

if (json%failed()) then
write(error_unit, *) "ERROR: Invalid .json file: ", json_str
call exit(1)
error stop 1
end if

call json%get(self%name//".value(1)", self%value)
Expand Down
5 changes: 3 additions & 2 deletions test/test.f90
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ subroutine test(value, calc_value, name)
write (*, "(A)", advance="no") name
if (abs((value - calc_value)/value) > tolerance) then
print *, "Error!"
call exit(1)
error stop 1
else
print *, "Ok!"
end if
Expand All @@ -65,8 +65,9 @@ subroutine test_failed_read
exitstat=exitstat, &
cmdstat=cmdstat, &
cmdmsg=cmdmsg)
if (exitstat /= 1) call exit(1)
if (exitstat /= 1) error stop 1
else
print *, "Should fail:"
sus = Substance("fai")
end if
end subroutine
Expand Down

0 comments on commit 1ca415b

Please sign in to comment.