Skip to content

Commit 63288a6

Browse files
awvwgkmilancurcic
andauthored
Add meaningful error message to example package
Co-authored-by: Milan Curcic <[email protected]>
1 parent d9a325a commit 63288a6

File tree

1 file changed

+3
-3
lines changed
  • example_packages/version_file/app

1 file changed

+3
-3
lines changed

example_packages/version_file/app/main.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
program stub
22
implicit none
3-
logical :: exist
3+
logical :: exists
44
integer :: unit
55
character(len=100) :: line
6-
inquire(file="VERSION", exist=exist)
7-
if (.not.exist) error stop
6+
inquire(file="VERSION", exist=exists)
7+
if (.not.exists) error stop "File VERSION does not exist."
88
open(file="VERSION", newunit=unit)
99
read(unit, '(a)') line
1010
close(unit)

0 commit comments

Comments
 (0)