Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Marnix · Oct 04, 2011 at 06:06 PM · c#errorexception

Best way to handle exceptions in release

What is the best way to throw errors in your game?

I was trying to using actual exceptions, but Unity is a bit different than normal applications since they have an entry point and unity doesn't.

So now, I am trying to throw new Exception(), but this doesn't seem to be the way. Debug.LogError is only for debug modes. How can I make sure that EVERY exception is caught in the release build and the user gets a nice error on the screen and the exception is nicely logged to a log manager?

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Eric5h5 · Oct 04, 2011 at 08:41 PM 0
Share

I don't know what you mean by "Debug.LogError is only for debug modes." It always prints to the log file regardless.

avatar image Marnix · Oct 05, 2011 at 07:50 AM 0
Share

Debug.LogError only prints a statement to the unity console. But does it also log to a file? And is this the appropriate way of catching a real C# exception? It feels a bit tricky.

avatar image snmaynard · Dec 10, 2012 at 06:47 AM 0
Share

did you find a solution to this problem?

avatar image ybaklaci · Jan 13, 2016 at 01:16 PM -1
Share

Hi Dave Carlile,

I am writing this to contact you, because there is no other way for this. Eventhough my comments are pointing out the same plugin for the same kind of problem, you can not deny it is helpful and solving their problem. I don't intend to spam around, but I have developed a helpful plugin and want people to profit from it. I also myself find a lot of useful plugin referance from unity3d blog.

Regards

avatar image Dave-Carlile ybaklaci · Jan 13, 2016 at 02:04 PM 1
Share

Just following the rules. Answering a bunch of old questions with a link to your product is spam. We'll usually let a very few go through, but once it gets excessive it's stopped. Simple as that. If you want to advertise your asset store product there are places in the forums where you can create a thread about it. Unity Answers is not the place for it.

Also, please use Comments for discussion and reserve Answers for answers to the actual question. I converted your answer to a comment for you.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by timsk · Oct 05, 2011 at 09:30 AM

Check out this thread:

http://answers.unity3d.com/questions/20147/global-error-logging-and-overflow-checking.html

It mentions Application.RegisterLogCallBack

Which might be what your looking for.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Marnix · Oct 13, 2011 at 09:51 AM 0
Share

That is not quite what I'm looking for. I want to handle ALL my exceptions. Even simple ones like: filenotfoundexception. RegisterLogCallBack only lets me have an extra call when a log is called.

I am looking for: "there is an exception somewhere in code: where to I leave it, how can I be certain that my application doesn't crash?"

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

TlsException error only on windows 10 (not mac) 0 Answers

Despawner script returns null reference exception. 0 Answers

Multiple Cars not working 1 Answer

I'm getting a StackOverFlowException 1 Answer

Distribute terrain in zones 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges