Opened 12 years ago
Closed 7 years ago
#2091 closed defect (fixed)
reinit(der(x), ...) should give better error message
Reported by: | Peter Aronsson | Owned by: | somebody |
---|---|---|---|
Priority: | high | Milestone: | 2.0.0 |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: | Lennart Ochel |
Description
Validating this model:
model bouncingball Real y; Real dery13; initial equation y=5; der(y)=0; equation der(dery13)=-9.81; when {y < 0,y > 0} then reinit(der(y), (-0.95)*der(y)); end when; dery13=der(y); end bouncingball;
gives this error message:
Error: No matching function found for reinit in component <NO COMPONENT> Error: Class reinit not found in scope bouncingball. Error: Error occured while flattening model bouncingball
A more helpful message would be "Error: The first argument of reinit must be a variable of type Real or an array of such variables."
Change History (11)
follow-up: 11 comment:1 by , 12 years ago
comment:2 by , 12 years ago
Cc: | added |
---|
comment:4 by , 10 years ago
Milestone: | 1.9.1 → 1.9.2 |
---|
This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).
comment:5 by , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:10 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:11 by , 7 years ago
Milestone: | 1.12.0 → 2.0.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Replying to lochel:
Replying to petar:
A more helpful message would be "Error: The first argument of reinit must be a variable of type Real or an array of such variables."
Or even better:
"Error: The first argument of reinit must be a variable of type Real or an array of such variables that must be selected as a state (resp., states) at least when the enclosing when clause becomes active"
The new front end gives:
[1] 02:18:06 Translation Error [M: 10:5-10:35]: The first argument to reinit must be a variable of type Real or an array of such variables.
Replying to petar:
Or even better: