I don't think the constructor is the correct place to check for this, but rather in isDataAvailable(). It's not just called by the constructor but also in lookup methods, so it would be better to properly catch it in isDataAvailable and to avoid conditional logic in the constructor.
I don't think the constructor is the correct place to check for this, but rather in
isDataAvailable()
. It's not just called by the constructor but also in lookup methods, so it would be better to properly catch it inisDataAvailable
and to avoid conditional logic in the constructor.