Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace error with a warning when object not found in [REPORT] #172

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/solver/report.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ int report_readOptions(char* tok[], int ntoks)
for (t = 1; t < ntoks; t++)
{
j = project_findObject(m, tok[t]);
if ( j < 0 ) return error_setInpError(ERR_NAME, tok[t]);
// --- check if object can be found
if ( j < 0 ) {
report_writeWarningMsg(WARN13, tok[t]);
continue;
}
switch ( m )
{
case SUBCATCH: Subcatch[j].rptFlag = TRUE; break;
Expand Down
2 changes: 2 additions & 0 deletions src/solver/text.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
#define WARN11 "WARNING 11: non-matching attributes in Control Rule"
#define WARN12 \
"WARNING 12: inlet removed due to unsupported shape for Conduit"
#define WARN13 \
"WARNING 13: WARNING 13: undefined object for reporting"

// Analysis Option Keywords
#define w_FLOW_UNITS "FLOW_UNITS"
Expand Down