The error() function is part of FlexCAN_T4.
FCTP_FUNC bool FCTP_OPT::error(CAN_error_t &error, bool printDetails) {
if ( !busESR1.size() ) return 0;
NVIC_DISABLE_IRQ(nvicIrq);
error.ESR1 = busESR1.read();...
Trying to use the FIFO blocks mboxes, both polled and interrupt driven.
Initialization:
void MCOUSER_ResetCommunication(void){
int i;
gTimCnt = GTIMCNT; // Initialize global timer
canbus1.begin(); //...