Compdigitec Labs

« | Home | »

Solving “Fatal error: Exception thrown without a stack frame in Unknown on line 0”

By admin | August 2, 2009

If you attempt to throw an exception from a PHP destructor or an PHP exception handler, your script will execute fine for the most part and then crash with the rather cryptic error message, “Fatal error: Exception thrown without a stack frame in Unknown on line 0“. This message is unfortunately very cryptic if you are trying to debug your code. This effect is further amplified due to a lack of PHP debuggers and you must instead resort to using various print_r()s and var_dump()s in order to debug the program. The error message in basic form means that you’ve thrown an exception where an exception cannot be thrown (leading to “no stack frame” – exception handlers and destructors do not have a stack frame. This instead results in this rather cryptic error message that does not include script locations or detailed error information).

Most often, the error will appear if you use an exception handler combined with an error reporting to exception handler by converting it to an ErrorException, then there a suddenly a whole new magnitude of ways to throw errors within the exception handle, especially if E_NOTICE, E_STRICT and/or E_WARNING errors are converted. This form most often occurs when you use variables without first initializing them. This error may be preventable by wrapping the exception handler within a try/catch block.

A second form of this error occurs when you attempt to throw an exception in a destructor. This is well documented in the PHP manual, but this can still be triggered if you accidentally throw an exception:

There is no exactly solid way to identify this type of error as you may not know exactly what your functions do. If you are throwing exceptions manually in your destructor, you need to go back to the PHP manually and read that it is not possible to throw exceptions within the destructor (as it lacks a stack frame). For the other two, you may need to comment out your destructors and manually uncomment parts until you reach the point where you find the error line as the error message produced by PHP is not too informative.

If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!

Topics: PHP | 71 Comments »

71 Responses to “Solving “Fatal error: Exception thrown without a stack frame in Unknown on line 0””

  1. Escortsdehradun Says:
    June 22nd, 2022 at 07:42

    very like perusing an article that can make individuals think

  2. Do My Math Homework Online Says:
    June 30th, 2022 at 06:45

    Struggling with a math’s homework in college, students wonder how will do my math homework online in a days of back to back classes, assignments and quiz may leave you depleted of motivation to tackle yet another math homework and so you can find if someone can do my math homework. The good news is that there are online resources like domyhomework.us where you can find experts and professionals to do your math homework.

  3. Write My Dissertation Says:
    July 7th, 2022 at 07:55

    NEED HELP! For Science Assignments. Get Best Quality Science Homework Help from a company called New Assignment Help. Their team of Experts and Professionals who are willing to help you in Completing your Assignment at Affordable Price. Also If you are looking For someone for Write My Dissertation the Company is Helping with Writing Dissertation as well.

  4. CHEMISTRY ASSIGNMENT EXPERT Says:
    July 19th, 2022 at 07:03

    Hey , are you finding Chemistry assignment. I’m from Great Assignment team Experts with PhD Qualified from universities help you score HD+ Grades & Meet the highly qualified academic writers and receive quality papers for every project submission. CHEMISTRY ASSIGNMENT HELP . provide help with all the branches of Chemistry such as Bio-Chemistry, Physical Chemistry, Organic Chemistry, Inorganic Chemistry, Analytical Chemistry.

  5. mark spencer Says:
    July 23rd, 2022 at 12:40

    It is good to hear that your store is now expanding to new locations. I have been a patron of Fantastic Eyes because of all the wonderful work that you guys do. I hope that this expansion move of yours do my paper for me will turn out to be successful. I will definitely go and see this new store of yours

  6. Alex Swan Says:
    August 3rd, 2022 at 05:17

    New Assignment Help UK Offer you HRM assignment help for essays, case studies, research paper writing and more. Order us to do your academic papers.and we also provide you and Do My Assignment to students of colleges and universities.
    https://www.newassignmenthelp.co.uk/hrm-essay-help

  7. Rachael Ross Says:
    August 18th, 2022 at 02:33

    Myself, Rachael Ross and I am educational consultant at myassignmenthelp.com which is known as one of the best assignment help online company. So, if you are looking for Thesis Writing Service, Descriptive Essay Help, Taxation Law Essay Help and philosophy essay help then feel free to contact us.

  8. willjames Says:
    September 5th, 2022 at 01:47

    Hey , guys we all know that the law is an typical and hard topics for students to learn and write and they always need to Write My Law Assignment in UK on the google’s search bar. So Native Assignment Help provides the best content on law assignment from the expert writers . They know the time limit to submit assignment in university so they give us assignment on and also available discounts on their portal.

  9. Coursework Help Says:
    September 13th, 2022 at 00:52

    Coursework writing service may not be going great for you, but rather it seems like one for our master authors. It doesn’t imply that they convey you the request without investing a lot of energy and compromising. Regardless of whether they need to work almost too hard to finish your work.

  10. pink jacket women Says:
    September 13th, 2022 at 06:44

    the blog is an outstanding blog, the content is totally dependent upon amazing flow

  11. road trip Says:
    September 16th, 2022 at 07:54

    I’ll stick with you!

  12. Write My Python Assignment in UK Says:
    September 19th, 2022 at 06:40

    Doing python assignments and every time need of Write My Python Assignment in UK for students. Computer programming can be more difficult at times as people find it hard to learn. Python subject here makes it easy for them by providing clearer language and programs for running successful operations. Native Assignment Help has the best expert writers to do assignments and they assured your A++ grades.

  13. Write MY Database Assignment in UK Says:
    September 23rd, 2022 at 06:38

    Write MY Database Assignment in UK is one of the most complex tasks out of all. None of the companies can function smoothly without proper computer programming and database. The reason is that database makes it easier to execute timely operations and keep records of the same. Native Assignment Help has the best assignment writer in the UK. So getting the services and reducing your workload.

  14. Case Study Help Says:
    September 27th, 2022 at 06:37

    We have got you Case Study Help for every such student who intends to score good when it comes to case studies. All it takes is just some small efforts to grab the writing services wherein you will be facilitated with all the basic necessities. Native Assignment Help has the best Assignment writers with experience. They are guaranteed to ensure your A++ grades.

  15. History Assignment help Says:
    September 28th, 2022 at 01:31

    Seeking History Assignment Help and enjoy the privilege of getting better assignments at your doorstep. We have a team of a dedicated workforce who would provide you with amusing assignments with a click. Just get registered with them and be free with how you attain the work with a blink. Native Assignment Help has the best assignment writer in the UK. Their content is not duplicated.

  16. University Assignment Says:
    October 11th, 2022 at 07:40

    Get assignment Help online by UK native subject experts and secure top grades. Native Assignment Help offers the best assignment writing service to students at 45% off. Students face the most when they are allotted another assignment amidst the already existing hustle of workload. From being there for the classes to being there with the assignments, the students can deny none of the challenges. However, they can ease this by taking help in university assignment from the best authorities for guaranteed grades. Native Assignment Help has expert writers to write your assignments. Sometimes on their portal discounts are available.

  17. Project Management Says:
    October 21st, 2022 at 01:41

    Project management assignment help is an extensive subject that teaches about the application of skills, knowledge, experience, and strategies to develop a relevant project, product, or idea within a limited time. Native Assignment Help provides the best assignment writing services in the UK. Sometimes they provide discounts and offers. So assured of your A++ grades.

  18. Psychology Assignment Help Says:
    October 26th, 2022 at 05:18

    Never be anxious about your assignment just because you are not able to complete it. Rather, you should keep calm and think about the different ways of solving it like asking for Psychology assignment help.

  19. resume writing service Says:
    October 28th, 2022 at 06:27

    New Assignment Help UK Offer you Professional Resume Writing Services Surrey CV writers write resume reviews, Cover Letters, Job application letters and do interview coaching.

  20. Jenish Says:
    November 5th, 2022 at 10:58

    I assure you after reading this essay on assignment help a lot of young people are going to love this website. This blog made the work just too easy! I hope to find more astonishing and stunning works like this one. I don’t always praise many articles but this is the best one I have encountered on the internet. I have started to admire this one for real.

    Assessment Help Australia

  21. Business law assignment Help Says:
    November 30th, 2022 at 01:35

    This is a very unique and magnificent post

Comments