Add post limit exception and remove legacy code.
Handle pastebin post limit error.

Closes #5492.
Merge remote-tracking branch 'refs/remotes/ivan/bug/5492_pastebin-post-limit' into develop