Deviation between actual result and expected result during testing bug
If bug affects functionality of application/system during testing defect
User gets unexpected result after supplying valid input in application while using tested system/application error
Error : It is the Deviation from actual and the expected value.
or other way u can say that Error is human mistake which produce incorrect result.
Error - Developer
Bug : 1. It is found in the development environment before the
product is shipped to the respective customer.
2. Whenever an issue in not in compliance with the
functional requirement specification(FRS) its a bug in the
software.
3. Bug : Tester
Defect : 1. It is found in the product itself after it is
shipped to the respective customer.
2. Whenever the issues are not in accordance with the
customer requirement specification (CRS) then its a defect.
3. Defect: Customer
Nicely put and its easier to remember the distinction the way you have put it.Thanks
Just an addendum from my side
Error May lead to Bug and bug leads to Defects and Defects may lead to failures
'Bug' , 'Defect' mean the same thing...Error is the mistake by the developers in the system which can be caught by Testers/Users and then called a bug or a defect , sometimes also called an 'Issue'.