The ezbinaryfile has support for detecting if file is bigger than upload_max_file_size. However, ezbinaryfile doesn't detect if file size exceeds post_max_size.
This is not possible to detect by a datatype either since all post variables are removed in such case. It therefore needs to be detected elsewhere (like in content/edit)
Here is a patch which does the trick.
Regarding my comment:
In PHP's source code you have this (main/rfc1867.c):
I guess SG(request_info).content_length is the size of the whole request, not only the post data. But I am not sure...Anyway, since we also check if we indeed has no POST variables I think the detection in my patch is quite OK.