mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 08:48:46 +02:00
617c8c787d
Unified User Action (UUA) is a centralized, real-time stream of user actions on Twitter, consumed by various product, ML, and marketing teams. UUA makes sure all internal teams consume the uniformed user actions data in an accurate and fast way.
17 lines
543 B
Scala
17 lines
543 B
Scala
package com.twitter.unified_user_actions.enricher
|
|
|
|
/**
|
|
* When this exception is thrown, it means that an assumption in the enricher services
|
|
* was violated and it needs to be fixed before a production deployment.
|
|
*/
|
|
abstract class FatalException(msg: String) extends Exception(msg)
|
|
|
|
class ImplementationException(msg: String) extends FatalException(msg)
|
|
|
|
object Exceptions {
|
|
def require(requirement: Boolean, message: String): Unit = {
|
|
if (!requirement)
|
|
throw new ImplementationException("requirement failed: " + message)
|
|
}
|
|
}
|