Check-in [ce45e65d52]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Print stack traces when a Throwable is made.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ce45e65d52ec920143d23a4a21edc8b475403dc1
User & Date: stephanie.gawroriski 2019-11-30 20:34:24
Context
2019-11-30
20:52
Do not make ATOMIC_INT_DECREMENT_AND_GET not fail in SummerCoat if the value falls below zero (like RatufaCoat); In the GC check, only perform GC if the value is not-positive; Only make BREAKPOINT fail in RatufaCoat if debugging is enabled to match SummerCoat; Add debug printing to over-GC (not sure how this is happening yet) check-in: e4720d6e8a user: stephanie.gawroriski tags: trunk
20:34
Print stack traces when a Throwable is made. check-in: ce45e65d52 user: stephanie.gawroriski tags: trunk
20:29
Add JavaStackState.doThrow(). check-in: 47cee9191d user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/klib/supervisor/java/lang/Throwable.java.

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
..
87
88
89
90
91
92
93



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
	/**
	 * Initializes the exception with no message or cause.
	 *
	 * @since 2019/05/25
	 */
	public Throwable()
	{
		// Hit a breakpoint if this is OOM
		if (this instanceof OutOfMemoryError)
			Assembly.breakpoint();
		
		this._message = null;
		this._cause = null;
		
		// Get the trace
		this._rawtrace = Throwable.__trace();
	}
	
	/**
	 * Initializes the exception with the given message and no cause.
	 *
	 * @param __m The message.
	 * @since 2019/05/25
	 */
	public Throwable(String __m)
	{
		// Hit a breakpoint if this is OOM
		if (this instanceof OutOfMemoryError)
			Assembly.breakpoint();
		
		this._message = __m;
		this._cause = null;
		
		// Get the trace
		this._rawtrace = Throwable.__trace();
	}
	
	/**
	 * Initializes the exception with the given message and cause.
	 *
	 * @param __m The message.
	 * @param __t The cause.
................................................................................
			Assembly.breakpoint();
		
		this._message = __m;
		this._cause = __t;
		
		// Get the trace
		this._rawtrace = Throwable.__trace();



	}
	
	/**
	 * Initializes the exception with the given cause and no message.
	 *
	 * @param __t The cause.
	 * @since 2019/05/25
	 */
	public Throwable(Throwable __t)
	{
		// Hit a breakpoint if this is OOM
		if (this instanceof OutOfMemoryError)
			Assembly.breakpoint();
		
		this._message = null;
		this._cause = __t;
		
		// Get the trace
		this._rawtrace = Throwable.__trace();
	}
	
	/**
	 * Adds a suppressed throwable which will be thrown alongside this
	 * throwable. This is mainly used with try-with-resources although a
	 * programmer may wish to add related throwables that additionally
	 * happened.







|
<
<
<
<
<
<
<
<










|
<
<
<
<
<
<
<
<







 







>
>
>










|
<
<
<
<
<
<
<
<







39
40
41
42
43
44
45
46








47
48
49
50
51
52
53
54
55
56
57








58
59
60
61
62
63
64
..
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91








92
93
94
95
96
97
98
	/**
	 * Initializes the exception with no message or cause.
	 *
	 * @since 2019/05/25
	 */
	public Throwable()
	{
		this(null, null);








	}
	
	/**
	 * Initializes the exception with the given message and no cause.
	 *
	 * @param __m The message.
	 * @since 2019/05/25
	 */
	public Throwable(String __m)
	{
		this(__m, null);








	}
	
	/**
	 * Initializes the exception with the given message and cause.
	 *
	 * @param __m The message.
	 * @param __t The cause.
................................................................................
			Assembly.breakpoint();
		
		this._message = __m;
		this._cause = __t;
		
		// Get the trace
		this._rawtrace = Throwable.__trace();
		
		// Print this trace
		this.printStackTrace();
	}
	
	/**
	 * Initializes the exception with the given cause and no message.
	 *
	 * @param __t The cause.
	 * @since 2019/05/25
	 */
	public Throwable(Throwable __t)
	{
		this(null, __t);








	}
	
	/**
	 * Adds a suppressed throwable which will be thrown alongside this
	 * throwable. This is mainly used with try-with-resources although a
	 * programmer may wish to add related throwables that additionally
	 * happened.