<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="88586" data-post-id="88586">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ndac_todoroki" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ndac_todoroki/120/8840_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ndac_todoroki
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I am pretty late here, but I’m afraid one can not overwrite <code>Supervisor</code>s <code>handle_info/2</code>, as well as <code>handle_call</code> and <code>handle_cast</code>, because while <code>Supervisor</code> does not define those callbacks.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Sup do
  use Supervisor

  def handle_info(any, state) do
    IO.inspect any
  end
end

# try messaging
send(sup_pid, :hello)
</code></pre>
<p>Trying the above does not work, it will say something like<br>
<code>01:52:12.737 [error] Supervisor received unexpected message: :hello</code></p>
<p>The <code>handle_info</code> <code>handle_call</code> the <code>Supervisor</code> can receive seems to be defined <a href="https://github.com/erlang/otp/blob/master/lib/stdlib/src/supervisor.erl" rel="noopener nofollow ugc">here</a>, and Elixir is just calling that inside <code>def which_children, do: ...</code>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="88586" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/trapping-exit-reason-in-supervisor/7240/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-88586" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="88586"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>