Issue #4986: May exceed the maximum margin of rect

May exceed the maximum margin of rect
cc.assert -> cc.error