সম্পাদনা
public class Main { static Exception user() { Exception cause = new Exception("ডেটা পাওয়া যায়নি"); return new Exception("অপারেশন ব্যর্থ হয়েছে", cause); } static void page() { try { throw user(); } catch (Exception error) { System.out.println(error.getCause().getMessage()); } } public static void main(String[] args) { page(); } }
পূর্বরূপ