Check-in [7a4d1e94cc]

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

Overview
Comment:In Throwable remove __debug(), a hiya appended to a message, and breakpoint on OOM.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7a4d1e94cc5f264f9d21c3e0cd5670da1a6d01fd
User & Date: stephanie.gawroriski 2019-11-30 20:12:38
Context
2019-11-30
20:29
Add JavaStackState.doThrow(). check-in: 47cee9191d user: stephanie.gawroriski tags: trunk
20:12
In Throwable remove __debug(), a hiya appended to a message, and breakpoint on OOM. check-in: 7a4d1e94cc user: stephanie.gawroriski tags: trunk
19:59
After an object is garbage collected, clear the register to zero. check-in: 72e75dd2b4 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
81
82




83
84
85
86
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
...
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
	/**
	 * Initializes the exception with no message or cause.
	 *
	 * @since 2019/05/25
	 */
	public Throwable()
	{




		this._message = null;
		this._cause = null;
		
		// Get the trace
		this._rawtrace = Throwable.__trace();
		
		// Possible debug stuff
		this.__debug();
	}
	
	/**
	 * Initializes the exception with the given message and no cause.
	 *
	 * @param __m The message.
	 * @since 2019/05/25
	 */
	public Throwable(String __m)
	{




		this._message = __m;
		this._cause = null;
		
		// Get the trace
		this._rawtrace = Throwable.__trace();
		
		// Possible debug stuff
		this.__debug();
	}
	
	/**
	 * Initializes the exception with the given message and cause.
	 *
	 * @param __m The message.
	 * @param __t The cause.
	 * @since 2019/05/25
	 */
	public Throwable(String __m, Throwable __t)
	{




		this._message = __m + "hiya";
		this._cause = __t;
		
		// Get the trace
		this._rawtrace = Throwable.__trace();
		
		// Possible debug stuff
		this.__debug();
	}
	
	/**
	 * Initializes the exception with the given cause and no message.
	 *
	 * @param __t The cause.
	 * @since 2019/05/25
	 */
	public Throwable(Throwable __t)
	{




		this._message = null;
		this._cause = __t;
		
		// Get the trace
		this._rawtrace = Throwable.__trace();
		
		// Possible debug stuff
		this.__debug();
	}
	
	/**
	 * 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.
................................................................................
	 */
	@Override
	public String toString()
	{
		return this._message;
	}
	
	/**
	 * Prints some debug message.
	 *
	 * @since 2019/11/20
	 */
	private final void __debug()
	{
		todo.DEBUG.note("Tossed: %s", this._message);
	}
	
	/**
	 * Returns the call stack.
	 *
	 * @return The resulting call stack.
	 * @since 2019/06/17
	 */
	private static final int[] __trace()







>
>
>
>





<
<
<










>
>
>
>





<
<
<











>
>
>
>
|




<
<
<










>
>
>
>





<
<
<







 







<
<
<
<
<
<
<
<
<
<







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
81
82
83
84
85
86
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
...
299
300
301
302
303
304
305










306
307
308
309
310
311
312
	/**
	 * 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.
	 * @since 2019/05/25
	 */
	public Throwable(String __m, Throwable __t)
	{
		// Hit a breakpoint if this is OOM
		if (this instanceof OutOfMemoryError)
			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.
................................................................................
	 */
	@Override
	public String toString()
	{
		return this._message;
	}
	










	/**
	 * Returns the call stack.
	 *
	 * @return The resulting call stack.
	 * @since 2019/06/17
	 */
	private static final int[] __trace()