MCD c++ ricorsivo

int mcd(int a,int b){
return (b==0 || a==0) ? throw exception(): a%b==0 ? b:mcd(b,a%b);
}
int main(int argc, const char * argv[]) {
    
    try
    {
        cout<<mcd(0,15)<<endl;
    }catch(exception e)
    {
        cout<<"MCD non consentito\n";
    }
 
    return 0;
}