79810484

Date: 2025-11-05 18:58:34
Score: 1
Natty:
Report link

It can be achieved by using predefined macros : __ FILE__ and __ LINE__ as below.

try {
    throw std::runtime_error(" File Name :" __FILE__ " with Line Number as " + std::to_string(__LINE__));
}
catch (const std::exception& e) {
    std::cout << e.what() << std::endl;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Asis Kumar Panda