title: Android Room Exceptions
body: <p>What kinds of exceptions I should consider while working with Android Room.
  From my research I found out that there is only one exception that might occur.</p>
  
  <p><a href="https://developer.android.com/reference/android/arch/persistence/room/package-summary#exceptions" rel="noreferrer">Room Exceptions</a></p>
  
  <p>That is also when you are having <code>Single&lt;T&gt;</code> as a return type and you have an empty return. Other than that I couldn't find any other possible scenario that might throw an exception.</p>
  
  <p>Of course, there might be some exceptions if you have some logical incorrect implementations, like</p>
  
  <ul>
  <li>Editing scheme, but not implementing <code>Migration</code></li>
  <li>Not implementing <code>OnConflictStrategy</code> while inserting</li>
  <li>Running Room on Main Thread while not allowing it with <code>allowMainThreadQueries()</code></li>
  </ul>
  
  <p>I did some research and tried out almost all possible cases, mostly with RxJava return types and I saw one exception mentioned above and that's it.</p>
  
  <blockquote>
    <p><a href="https://medium.com/@musooff/rxjava-and-room-complete-guide-sheet-7fca5b49804e" rel="noreferrer">Here</a> is my tests that I run</p>
  </blockquote>
  
  <p>I wanted to make sure that I have implementation for every possible scenario and not have some exception and unexpected crashes. I was thinking of occurrences of <code>SQLite</code> exceptions might happen, but I believe it's wrapped around Room and it will handle. (Not sure)</p>
  
  <p>Can you give any other possible exceptions that might occur?</p>