cms-gem-daq-project / ctp7_modules

0 stars 13 forks source link

Functions still relying on 0xdeaddead #170

Closed lmoureaux closed 4 years ago

lmoureaux commented 4 years ago

Brief summary of issue

The template RPC framework supports exceptions to signal failures, and the readReg functions were rewritten to throw on failure instead of returning 0xdeaddead. Two places in utils.cpp still compare against 0xdeaddead to check for errors: https://github.com/cms-gem-daq-project/ctp7_modules/blob/feature/templated-rpc-methods/src/utils.cpp#L527 and https://github.com/cms-gem-daq-project/ctp7_modules/blob/feature/templated-rpc-methods/src/utils.cpp#L494

Types of issue

Expected Behavior

0xdeaddead doesn't have a special meaning

Current Behavior

repeatedRegRead and writeReg will fail on 0xdeaddead

Possible Solution (for bugs)

Use try...catch

Context (for feature requests)

Noticed while reading the code

Your Environment