0

I have a code block like this.

try {
   gen <object> keeping { <constraints>};
} else {
   error(Failed to generate){
      out(<additional debug information>);
   };
};

I would like to have Specman print out the regular debug message from a gen failure along with my additional debug information. Any way to do this?

qzcx
  • 361
  • 1
  • 12

2 Answers2

1

If by "regular debug message" you mean the message generated by Specman when encountering a generation failure, then no, you can't print this message and your own custom message. This is the whole point of a try block, to eat up any errors and to replace them with a custom response.

Tudor Timi
  • 7,453
  • 1
  • 24
  • 53
1

If you need to know more about this, you might want to check out the reflection classes rf_constraint and rf_constraint_layer. You can use them to see whether a constraint is satisfied before you actually do generation (and possibly get an error).

Thorsten
  • 710
  • 8
  • 17
  • Interesting, but I don't think it solves my problem. Looking into this, it seems that reflection will only tell me if a particular constraint to satisfied on an already generated struct (and then modified I assume). Doesn't seem like it matches what I need – qzcx Sep 29 '15 at 16:16