diff --git a/src/stdlib_io.fypp b/src/stdlib_io.fypp index 583f46eb0..2dda4eea6 100644 --- a/src/stdlib_io.fypp +++ b/src/stdlib_io.fypp @@ -614,7 +614,7 @@ contains if (iostat/=0) then inquire(unit=lun,pos=errpos) - err0 = state_type('getfile',STDLIB_IO_ERROR,'Error reading',fileName,'at byte',errpos) + err0 = state_type('getfile',STDLIB_IO_ERROR,iomsg,'(',fileName,'at byte',errpos,')') call err0%handle(err) return