Likely a runtime error. If it works in your scenario, you can try a block of code, and catch any exceptions to fix them or display an error message.
You did not mention what language you're using, so here's an example in C++
#include <iostream>
int main()
{
int a, b;
std::cout << "Enter two numbers to divide: ";
std::cin >> a >> b;
try
{
if (b == 0)
throw "Cannot divide by zero!";
else
std::cout << a << "/" << b << "=" << a / b;
}
catch (std::string errMsg)
{
std::cout << errMsg;
}
return 0;
}