The signature of your pre-export method looks correct. More likely some function you are calling inside your pre-export method is being called with the wrong set of parameters. Any exceptions caught running your pre-export method will show up after the ‘Caught exception invoking’ part, so it’s potentially confusing as to whether the issue was invoking the pre-export method itself or some code inside of it.