@ixxxl,
Obviously, the error is caused by your custom code, but I can't tell you which part. You can debug your code, find instructions here.