Skip to content

Fix modelica system - #271

Merged
arun3688 merged 4 commits into
OpenModelica:masterfrom
syntron:fix_ModelicaSystem
Apr 29, 2025
Merged

Fix modelica system#271
arun3688 merged 4 commits into
OpenModelica:masterfrom
syntron:fix_ModelicaSystem

Conversation

@syntron

Copy link
Copy Markdown
Contributor

Simplify ModelicaSystem:

  • remove variables in xmlparse()
  • raise ModelicaSystemException if there is an invalid input type
  • do not try to continue in getSolution() but fail with ModelicaSytemException
  • remove redundant parenthese

@syntron
syntronforce-pushed the fix_ModelicaSystem branch 2 times, most recently from 2927d51 to d12e0a3CompareApril 25, 2025 21:09
…ases
there are a lot of functions which check the type of the input; this is
done by if ... elif ... - however, invalid input is not catched, i.e. there
is *NO* return value define (would be None) if the input is not matching
any of the if branches
Rule: fail early, fail hard - tell the user that something is wrong!
In this case, the user ask for the solution but could get None (= plain
'return') - this would case hard to track errors later (if verbose==False
and raiseerrors==False)
@syntron
syntronforce-pushed the fix_ModelicaSystem branch from d12e0a3 to d066548CompareApril 29, 2025 18:56
@arun3688
arun3688 merged commit cb657cf into OpenModelica:masterApr 29, 2025
@syntron
syntron deleted the fix_ModelicaSystem branch April 29, 2025 20:46
@syntronsyntron mentioned this pull request May 1, 2025
Closed
@syntronsyntron mentioned this pull request Sep 28, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@syntron@arun3688