Skip to content

Commit

Permalink
remove some more kalix.protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
patriknw committed Dec 17, 2024
1 parent 3245d92 commit 9cb96c4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ package akka.javasdk.impl
import akka.annotation.InternalApi
import akka.javasdk.eventsourcedentity.CommandContext
import akka.javasdk.keyvalueentity
import kalix.protocol.entity.Command
import kalix.protocol.event_sourced_entity.EventSourcedInit
import kalix.protocol.value_entity.ValueEntityInit

/**
* INTERNAL API
Expand All @@ -30,12 +27,6 @@ private[javasdk] object EntityExceptions {
def apply(message: String, cause: Option[Throwable]): EntityException =
EntityException(entityId = "", commandName = "", message, cause)

def apply(command: Command, message: String): EntityException =
EntityException(command.entityId, command.name, message, None)

def apply(command: Command, message: String, cause: Option[Throwable]): EntityException =
EntityException(command.entityId, command.name, message, cause)

def apply(context: keyvalueentity.CommandContext, message: String): EntityException =
EntityException(context.entityId, context.commandName, message, None)

Expand All @@ -49,22 +40,4 @@ private[javasdk] object EntityExceptions {
EntityException(context.entityId, context.commandName, message, cause)
}

object ProtocolException {
def apply(message: String): EntityException =
EntityException(entityId = "", commandName = "", "Protocol error: " + message, None)

def apply(command: Command, message: String): EntityException =
EntityException(command.entityId, command.name, "Protocol error: " + message, None)

def apply(entityId: String, message: String): EntityException =
EntityException(entityId, commandName = "", "Protocol error: " + message, None)

def apply(init: ValueEntityInit, message: String): EntityException =
ProtocolException(init.entityId, message)

def apply(init: EventSourcedInit, message: String): EntityException =
ProtocolException(init.entityId, message)

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
package akka.javasdk.impl

import akka.annotation.InternalApi
import kalix.protocol.entity.Command
import kalix.protocol.workflow_entity.WorkflowEntityInit

/**
* INTERNAL API
Expand All @@ -25,22 +23,6 @@ private[javasdk] object WorkflowExceptions {
def apply(message: String, cause: Option[Throwable]): WorkflowException =
WorkflowException(workflowId = "", commandName = "", message, cause)

def apply(command: Command, message: String, cause: Option[Throwable]): WorkflowException =
WorkflowException(command.entityId, command.name, message, cause)

}

object ProtocolException {
def apply(message: String): WorkflowException =
WorkflowException(workflowId = "", commandName = "", "Protocol error: " + message, None)

def apply(command: Command, message: String): WorkflowException =
WorkflowException(command.entityId, command.name, "Protocol error: " + message, None)

def apply(workflowId: String, message: String): WorkflowException =
WorkflowException(workflowId, commandName = "", "Protocol error: " + message, None)

def apply(init: WorkflowEntityInit, message: String): WorkflowException =
ProtocolException(init.entityId, message)
}
}

0 comments on commit 9cb96c4

Please sign in to comment.