Browse Source

cmDspClass.c : Add instance label to error message header.

master
kevin 9 years ago
parent
commit
3c6b55186b
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      dsp/cmDspClass.c

+ 5
- 4
dsp/cmDspClass.c View File

372
 }
372
 }
373
 
373
 
374
 
374
 
375
-cmDspRC_t _cmDspClassErrV( cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned instId, cmDspRC_t rc, const cmChar_t* fmt, va_list vl )
375
+cmDspRC_t _cmDspClassErrV( cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned instId, const cmChar_t* instLbl, cmDspRC_t rc, const cmChar_t* fmt, va_list vl )
376
 {
376
 {
377
   va_list vl2;
377
   va_list vl2;
378
   va_copy(vl2,vl);
378
   va_copy(vl2,vl);
379
   unsigned n = vsnprintf(NULL,0,fmt,vl2)+1;
379
   unsigned n = vsnprintf(NULL,0,fmt,vl2)+1;
380
 
380
 
381
+
381
   cmChar_t buf[n+1];
382
   cmChar_t buf[n+1];
382
   vsnprintf(buf,n,fmt,vl);
383
   vsnprintf(buf,n,fmt,vl);
383
   if( instId == cmInvalidId )
384
   if( instId == cmInvalidId )
384
     cmErrMsg( &classPtr->err, rc, "%s DSP Class:%s",buf, classPtr->labelStr);
385
     cmErrMsg( &classPtr->err, rc, "%s DSP Class:%s",buf, classPtr->labelStr);
385
   else
386
   else
386
-    cmErrMsg( &classPtr->err, rc, "%s DSP Class:%s Inst:%i",buf, classPtr->labelStr,instId);
387
+    cmErrMsg( &classPtr->err, rc, "%s DSP Class:%s Inst:%i %s",buf, classPtr->labelStr,instId,instLbl==NULL?"":instLbl);
387
 
388
 
388
   va_end(vl2);
389
   va_end(vl2);
389
   return rc;
390
   return rc;
393
 {
394
 {
394
   va_list vl;
395
   va_list vl;
395
   va_start(vl,fmt);
396
   va_start(vl,fmt);
396
-  rc = _cmDspClassErrV(ctx,classPtr,cmInvalidId,rc,fmt,vl);
397
+  rc = _cmDspClassErrV(ctx,classPtr,cmInvalidId,NULL,rc,fmt,vl);
397
   va_end(vl);
398
   va_end(vl);
398
   return rc;
399
   return rc;
399
 }
400
 }
402
 {
403
 {
403
   va_list vl;
404
   va_list vl;
404
   va_start(vl,fmt);
405
   va_start(vl,fmt);
405
-  rc = _cmDspClassErrV(ctx,inst->classPtr,inst->id,rc,fmt,vl);
406
+  rc = _cmDspClassErrV(ctx,inst->classPtr,inst->id,cmSymTblLabel(ctx->stH,inst->symId),rc,fmt,vl);
406
   va_end(vl);
407
   va_end(vl);
407
   return rc;
408
   return rc;
408
 }
409
 }

Loading…
Cancel
Save