more consistent error messages
This commit is contained in:
parent
7e8f630a62
commit
8ac4850dd3
|
@ -389,7 +389,7 @@ function tNode_get_byIndex(self,i) result(node)
|
||||||
class is(tList)
|
class is(tList)
|
||||||
self_ => self%asList()
|
self_ => self%asList()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected List')
|
call IO_error(706,ext_msg='Expected list')
|
||||||
endselect
|
endselect
|
||||||
|
|
||||||
item => self_%first
|
item => self_%first
|
||||||
|
@ -422,7 +422,7 @@ function tNode_get_byIndex_asFloat(self,i) result(nodeAsFloat)
|
||||||
scalar => node%asScalar()
|
scalar => node%asScalar()
|
||||||
nodeAsFloat = scalar%asFloat()
|
nodeAsFloat = scalar%asFloat()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected Scalar')
|
call IO_error(706,ext_msg='Expected scalar float')
|
||||||
end select
|
end select
|
||||||
|
|
||||||
end function tNode_get_byIndex_asFloat
|
end function tNode_get_byIndex_asFloat
|
||||||
|
@ -446,7 +446,7 @@ function tNode_get_byIndex_asInt(self,i) result(nodeAsInt)
|
||||||
scalar => node%asScalar()
|
scalar => node%asScalar()
|
||||||
nodeAsInt = scalar%asInt()
|
nodeAsInt = scalar%asInt()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected Scalar')
|
call IO_error(706,ext_msg='Expected scalar integer')
|
||||||
end select
|
end select
|
||||||
|
|
||||||
end function tNode_get_byIndex_asInt
|
end function tNode_get_byIndex_asInt
|
||||||
|
@ -470,7 +470,7 @@ function tNode_get_byIndex_asBool(self,i) result(nodeAsBool)
|
||||||
scalar => node%asScalar()
|
scalar => node%asScalar()
|
||||||
nodeAsBool = scalar%asBool()
|
nodeAsBool = scalar%asBool()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected Scalar')
|
call IO_error(706,ext_msg='Expected scalar Boolean')
|
||||||
endselect
|
endselect
|
||||||
|
|
||||||
end function tNode_get_byIndex_asBool
|
end function tNode_get_byIndex_asBool
|
||||||
|
@ -494,7 +494,7 @@ function tNode_get_byIndex_asString(self,i) result(nodeAsString)
|
||||||
scalar => node%asScalar()
|
scalar => node%asScalar()
|
||||||
nodeAsString = scalar%asString()
|
nodeAsString = scalar%asString()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected Scalar')
|
call IO_error(706,ext_msg='Expected scalar string')
|
||||||
endselect
|
endselect
|
||||||
|
|
||||||
end function tNode_get_byIndex_asString
|
end function tNode_get_byIndex_asString
|
||||||
|
@ -518,7 +518,7 @@ function tNode_get_byIndex_as1dFloat(self,i) result(nodeAs1dFloat)
|
||||||
list => node%asList()
|
list => node%asList()
|
||||||
nodeAs1dFloat = list%as1dFloat()
|
nodeAs1dFloat = list%as1dFloat()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected list')
|
call IO_error(706,ext_msg='Expected list of floats')
|
||||||
endselect
|
endselect
|
||||||
|
|
||||||
end function tNode_get_byIndex_as1dFloat
|
end function tNode_get_byIndex_as1dFloat
|
||||||
|
@ -542,7 +542,7 @@ function tNode_get_byIndex_as1dInt(self,i) result(nodeAs1dInt)
|
||||||
list => node%asList()
|
list => node%asList()
|
||||||
nodeAs1dInt = list%as1dInt()
|
nodeAs1dInt = list%as1dInt()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected list')
|
call IO_error(706,ext_msg='Expected list of integers')
|
||||||
endselect
|
endselect
|
||||||
|
|
||||||
end function tNode_get_byIndex_as1dInt
|
end function tNode_get_byIndex_as1dInt
|
||||||
|
@ -566,7 +566,7 @@ function tNode_get_byIndex_as1dBool(self,i) result(nodeAs1dBool)
|
||||||
list => node%asList()
|
list => node%asList()
|
||||||
nodeAs1dBool = list%as1dBool()
|
nodeAs1dBool = list%as1dBool()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected list')
|
call IO_error(706,ext_msg='Expected list of Booleans')
|
||||||
endselect
|
endselect
|
||||||
|
|
||||||
end function tNode_get_byIndex_as1dBool
|
end function tNode_get_byIndex_as1dBool
|
||||||
|
@ -590,7 +590,7 @@ function tNode_get_byIndex_as1dString(self,i) result(nodeAs1dString)
|
||||||
list => node%asList()
|
list => node%asList()
|
||||||
nodeAs1dString = list%as1dString()
|
nodeAs1dString = list%as1dString()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected list')
|
call IO_error(706,ext_msg='Expected list of strings')
|
||||||
endselect
|
endselect
|
||||||
|
|
||||||
end function tNode_get_byIndex_as1dString
|
end function tNode_get_byIndex_as1dString
|
||||||
|
@ -657,7 +657,7 @@ function tNode_contains(self,k) result(exists)
|
||||||
endif
|
endif
|
||||||
enddo
|
enddo
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected "list" or "dict"')
|
call IO_error(706,ext_msg='Expected list or dict')
|
||||||
endselect
|
endselect
|
||||||
|
|
||||||
end function tNode_contains
|
end function tNode_contains
|
||||||
|
@ -685,7 +685,7 @@ function tNode_get_byKey(self,k,defaultVal) result(node)
|
||||||
class is(tDict)
|
class is(tDict)
|
||||||
self_ => self%asDict()
|
self_ => self%asDict()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected Dict for key '//k)
|
call IO_error(706,ext_msg='Expected dict for key '//k)
|
||||||
endselect
|
endselect
|
||||||
|
|
||||||
j = 1
|
j = 1
|
||||||
|
@ -729,7 +729,7 @@ function tNode_get_byKey_asFloat(self,k,defaultVal) result(nodeAsFloat)
|
||||||
scalar => node%asScalar()
|
scalar => node%asScalar()
|
||||||
nodeAsFloat = scalar%asFloat()
|
nodeAsFloat = scalar%asFloat()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected Scalar for key '//k)
|
call IO_error(706,ext_msg='Expected scalar float for key '//k)
|
||||||
endselect
|
endselect
|
||||||
elseif (present(defaultVal)) then
|
elseif (present(defaultVal)) then
|
||||||
nodeAsFloat = defaultVal
|
nodeAsFloat = defaultVal
|
||||||
|
@ -760,7 +760,7 @@ function tNode_get_byKey_asInt(self,k,defaultVal) result(nodeAsInt)
|
||||||
scalar => node%asScalar()
|
scalar => node%asScalar()
|
||||||
nodeAsInt = scalar%asInt()
|
nodeAsInt = scalar%asInt()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected Scalar for key '//k)
|
call IO_error(706,ext_msg='Expected scalar integer for key '//k)
|
||||||
endselect
|
endselect
|
||||||
elseif (present(defaultVal)) then
|
elseif (present(defaultVal)) then
|
||||||
nodeAsInt = defaultVal
|
nodeAsInt = defaultVal
|
||||||
|
@ -791,7 +791,7 @@ function tNode_get_byKey_asBool(self,k,defaultVal) result(nodeAsBool)
|
||||||
scalar => node%asScalar()
|
scalar => node%asScalar()
|
||||||
nodeAsBool = scalar%asBool()
|
nodeAsBool = scalar%asBool()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected Scalar for key '//k)
|
call IO_error(706,ext_msg='Expected scalar Boolean for key '//k)
|
||||||
endselect
|
endselect
|
||||||
elseif (present(defaultVal)) then
|
elseif (present(defaultVal)) then
|
||||||
nodeAsBool = defaultVal
|
nodeAsBool = defaultVal
|
||||||
|
@ -822,7 +822,7 @@ function tNode_get_byKey_asString(self,k,defaultVal) result(nodeAsString)
|
||||||
scalar => node%asScalar()
|
scalar => node%asScalar()
|
||||||
nodeAsString = scalar%asString()
|
nodeAsString = scalar%asString()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected Scalar for key '//k)
|
call IO_error(706,ext_msg='Expected scalar string for key '//k)
|
||||||
endselect
|
endselect
|
||||||
elseif (present(defaultVal)) then
|
elseif (present(defaultVal)) then
|
||||||
nodeAsString = defaultVal
|
nodeAsString = defaultVal
|
||||||
|
@ -855,7 +855,7 @@ function tNode_get_byKey_as1dFloat(self,k,defaultVal,requiredSize) result(nodeAs
|
||||||
list => node%asList()
|
list => node%asList()
|
||||||
nodeAs1dFloat = list%as1dFloat()
|
nodeAs1dFloat = list%as1dFloat()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected 1D Float array for key '//k)
|
call IO_error(706,ext_msg='Expected 1D float array for key '//k)
|
||||||
endselect
|
endselect
|
||||||
elseif (present(defaultVal)) then
|
elseif (present(defaultVal)) then
|
||||||
nodeAs1dFloat = defaultVal
|
nodeAs1dFloat = defaultVal
|
||||||
|
@ -891,7 +891,7 @@ function tNode_get_byKey_as2dFloat(self,k,defaultVal) result(nodeAs2dFloat)
|
||||||
rows => node%asList()
|
rows => node%asList()
|
||||||
nodeAs2dFloat = rows%as2dFloat()
|
nodeAs2dFloat = rows%as2dFloat()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected 2D Float array for key '//k)
|
call IO_error(706,ext_msg='Expected 2D float array for key '//k)
|
||||||
endselect
|
endselect
|
||||||
elseif(present(defaultVal)) then
|
elseif(present(defaultVal)) then
|
||||||
nodeAs2dFloat = defaultVal
|
nodeAs2dFloat = defaultVal
|
||||||
|
@ -923,7 +923,7 @@ function tNode_get_byKey_as1dInt(self,k,defaultVal,requiredSize) result(nodeAs1d
|
||||||
list => node%asList()
|
list => node%asList()
|
||||||
nodeAs1dInt = list%as1dInt()
|
nodeAs1dInt = list%as1dInt()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected 1D Integer array for key '//k)
|
call IO_error(706,ext_msg='Expected 1D integer array for key '//k)
|
||||||
endselect
|
endselect
|
||||||
elseif (present(defaultVal)) then
|
elseif (present(defaultVal)) then
|
||||||
nodeAs1dInt = defaultVal
|
nodeAs1dInt = defaultVal
|
||||||
|
@ -989,7 +989,7 @@ function tNode_get_byKey_as1dString(self,k,defaultVal) result(nodeAs1dString)
|
||||||
list => node%asList()
|
list => node%asList()
|
||||||
nodeAs1dString = list%as1dString()
|
nodeAs1dString = list%as1dString()
|
||||||
class default
|
class default
|
||||||
call IO_error(706,ext_msg='Expected 1D String array for key '//k)
|
call IO_error(706,ext_msg='Expected 1D string array for key '//k)
|
||||||
endselect
|
endselect
|
||||||
elseif (present(defaultVal)) then
|
elseif (present(defaultVal)) then
|
||||||
nodeAs1dString = defaultVal
|
nodeAs1dString = defaultVal
|
||||||
|
|
Loading…
Reference in New Issue