Skip to content

Commit 59930b9

Browse files
committed
better notification for value error
1 parent 186f5a8 commit 59930b9

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/kc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,7 @@ I line(FILE*f, S*a, I*n, PDA*p) { //just starting or just executed: *a=*n=*p=0,
287287
cleanup:
288288
if(fCheck && (strlen(s)==0 || s[strlen(s)-1]<0)) exit(0);
289289
S ptr=0;
290-
//151012AP was -1, Changed to fer!=2 for fclose. Reverted to -1 (regression issue #312). fclose problem?? (issue #384).
291-
if(!strcmp(errmsg,"value"))oerr();
290+
if(!strcmp(errmsg,"value"));
292291
else if(strcmp(errmsg,"undescribed") && fer!=-1) { oerr(); I ctl=0;
293292
if(fError){
294293
if(2==fError)exit(1);

src/p.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,11 @@ I capture(S s,I n,I k,I*m,V*w,I*d,K*locals,K*dict,K func)
626626
I all=1;for(i=0;i<strlen(lineA);i++)if(!isalnum_(lineA[i])){all=0;break;}
627627
if(lineA[0]=='_')all=0;
628628
z=inKtree(dict,u,0);
629-
if((!fdc||all)&&!z)R (L)VLE;
629+
if((!fdc||all)&&!z){L err=(L)VLE;
630+
#ifndef DEBUG
631+
oerr(); O("%s\n%c\n",u,'^');
632+
#endif
633+
R err;}
630634
z=denameD(dict,u,fdc&&!all); }
631635
)
632636
CS(MARK_VERB , // "+" "4:" "_bin" ; grab "+:", "4::"

src/tests.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ Z I tests02()
492492
TC( (@[.:;"5 (a:5)/1";:] ), (1;"rank") )
493493

494494
TC(13, ({x(|+\\)\\1 1} 5)[5;0])
495-
TC( (.[.:;,"@[a-b]";:]) , (1;"parse") ) //specific err not important
495+
TC( (.[.:;,"@[a-b]";:]) , (1;"parse") )
496496

497497
TC( 5, _ceiling 4.6)
498498
TC(-4, _ceiling -4.6)

0 commit comments

Comments
 (0)