When a site is upgraded to 3.2, users are unable to delete modules and are shown a generic "An error has occurred" message. This also applies to trying to empty trash in the module manager.
In order to delete modules, you will first need to open the module(s) you want to delete for editing and save them. After this, you will be able to delete the module(s).
As an alternative you can use statements below in phpMyAdmin:
delete from #__modules_menu where moduleid in (select id from #__modules where published = -2)
delete from #__modules where published = -2
As always, replace #_ with your own prefix.