Exit event registering problem

Hello,
I’m trying to register to my ofApp exit event but the compiler gives me the following error:

error: no matching function for call to 'ofAddListener'

./../../libs/openFrameworks/events/ofEventUtils.h:75:6: note: candidate function [with ListenerClass = ofxTB] not viable: no known conversion from 'ofEvent<ofEventArgs>' to 'ofEvent<void> &' for 1st argument

I try to register to the event like this:

ofAddListener(ofEvents().exit, this, &ofxTB::exit);

Why this doesn’t compile?

I just found the mistake. My exit method was something like this:

void ofxTB::exit();

Whereas it should be something like this:

void ofxTB::exit(ofEventArgs& e);

I was mislead by the fact that the compiler told me that the first argument (ofEvents().exit) was of the wrong type…