This code is very suspicious:
|
if (b < 0) { |
|
if (check) { |
|
cytnx_error_msg(true, |
|
"[ERROR][put_block][BlockUniTensor] no avaliable block exists, " |
|
"check=true, so error throws. \n If you want without error when block " |
|
"is not avaliable, set check=false.%s", |
|
"\n"); |
|
} |
|
} else { |
This is replacing a block of a UniTensor, but if the caller specifies check = false then it silently ignores the error if the block to replace doesn't exist. What is the use case for this?
This code is very suspicious:
Cytnx/include/UniTensor.hpp
Lines 1497 to 1505 in fa4596e
This is replacing a block of a
UniTensor, but if the caller specifiescheck = falsethen it silently ignores the error if the block to replace doesn't exist. What is the use case for this?