MRI: improve error printing #25
			No reviewers
			
				
				
			
		
		
		
	
	
	
		Labels
		
	
	
	
	No labels
	
		
			
	
	RGSS accuracy
		
			bug
		
			compilation
		
			discussion
		
			documentation
		
			duplicate
		
			enhancement
		
			invalid
		
			performance issue
		
			port request
		
			question
		
			ruby incompatibility
		
			wontfix
		
		
	
		No milestone
		
			
		
	
	No project
	
		
	
	
	
	
		No assignees
		
	
	
		
			
		
	
	
	
		1 participant
	
	
		
		
	Notifications
	
		
	
	
	
		
	
	
	Due date
No due date set.
	
		Dependencies
		
		
	
	
	No dependencies set.
		Reference: MapleShrine/mkxp#25
		
	
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	
	No description provided.
		
		Delete branch "mri-improve-error-printing"
	
	Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Debug()is CRuby-style andshowMsgis RGSS-style. TheDebug()output is safe,showMsgmight be fragile.I think the RGSS-style error report is safe as long as
#backtraceisn't modified in a weird way. Then it could crash. But CRuby/MRI also crashes in some cases.Should I make the code more defensive?
Actually the
Debug()part can also crash. The question applies here as well.Can you provide me with a small example that would crash any of the output paths?
Actually, there's heaps of other ways to crash mkxp (eg. an intentionally malformed Scripts.rxdata), so I think the code is fine as it is for now (and modifying #backtrace seems sufficiently obscure).
Not returning an array would cause a crash. An example can't be simpler than this.
Writing similar code in Ruby instead of C++ would be a safer alternative. But if you're okay with it, then so be it.
Thanks. Error reporting shaping up to look pretty awesome!
You might consider adding your name+email to the copyright header for files you've worked on.