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
When calling LoadDatabase or LoadDatabaseString with a missing database, GetErrorString and OutputErrorString behave as expected but GetErrorStringLineCount and GetErrorStringLine do not.
ie
id = CreateIphreeqc()
if (id .LT.0) stop
res = SetErrorOn(id, .TRUE.)
res = LoadDatabase(id, 'phreeqcxx.dat')
if (res .NE.0) thencall OutputErrorString(id)
endifwrite (*,'("Returned LoadDatabase with ",I0," errors."/)') res
Outputs:
ERROR: LoadDatabase: Unable to open:"phreeqcxx.dat".
Returned LoadDatabase with 1 errors.
and
id = CreateIphreeqc()
if (id .LT.0) stop
res = SetErrorStringOn (id, .TRUE.)
res = LoadDatabase(id, 'phreeqcxx.dat')
if (res .NE.0) thendo i =1, GetErrorStringLineCount(id)
CALL GetErrorStringLine(id,i,Line)
write (*,'(A)') trim(line)
enddoendifwrite (*,'("Returned LoadDatabase with ",I0," errors."/)') res
Outputs:
Returned LoadDatabase with 1 errors.
Proposed fix
Call IPhreeqc::update_errors at the end of LoadDatabase and LoadDatabaseString
The text was updated successfully, but these errors were encountered:
When calling
LoadDatabase
orLoadDatabaseString
with a missing database,GetErrorString
andOutputErrorString
behave as expected butGetErrorStringLineCount
andGetErrorStringLine
do not.ie
Outputs:
and
Outputs:
Proposed fix
Call
IPhreeqc::update_errors
at the end ofLoadDatabase
andLoadDatabaseString
The text was updated successfully, but these errors were encountered: